mysql-ci

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 7 Imported by: 0

README

mysql-ci

This tools is a simple cli of mysql for CI.

How to install

download binary
wget https://github.com/KamikazeZirou/mysql-ci/releases/download/v0.2.0/mysql-ci-v0.2.0-linux-amd64.tar.gz
tar xzf mysql-ci-v0.2.0-linux-amd64.tar.gz # `mysql-ci` is created.
go install
# You need to add "$(go env GOPATH)/bin" to "PATH"
go install github.com/KamikazeZirou/mysql-ci@v0.2.0

Usage

Write a file named 'init.sql' like below.

CREATE DATABASE IF NOT EXISTS testdb;
USE testdb;

CREATE TABLE `foobar` (
    `id` bigint NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(`id`)
);

Then, run a command like below.

mysql-ci -h 127.0.0.1 -port 3306 -pass password -f 'init.sql'

You can directly specify a query by using option '-q' instead of '-f'.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL