make deps
make install
Create a config.toml
file as follows:
# filename: config.toml
[database]
user = "root"
password = "toor"
server = "localhost"
port = "3306"
database = "MyDatabase"
Then you can use it:
mygosql USAGE:
-config string
config.toml file (default "./config.toml")
-query string
Query to perform
There are not much functions supported yet:
➜ mygosql -query "SHOW Databases;"
+--------------------+
| SHOW DATABASES; |
+--------------------+
| MyDatabase |
| information_schema |
+--------------------+
➜ mygosql -query "SHOW TABLES;"
+--------------+
| SHOW TABLES; |
+--------------+
| test |
| user |
| pass |
+--------------+
➜ mygosql -query "SELECT * FROM user;"
+---------------------+
| SELECT * FROM user; |
+---------------------+
| root |
| admin |
| john |
| alice |
+---------------------+
make all