https://github.com/joanbono/mygosql
MySQL client written in Go
https://github.com/joanbono/mygosql
go golang mysql mysql-cli mysql-client
Last synced: 19 days ago
JSON representation
MySQL client written in Go
- Host: GitHub
- URL: https://github.com/joanbono/mygosql
- Owner: joanbono
- License: apache-2.0
- Created: 2019-08-03T19:28:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-03T20:20:57.000Z (almost 7 years ago)
- Last Synced: 2025-03-02T01:13:29.897Z (over 1 year ago)
- Topics: go, golang, mysql, mysql-cli, mysql-client
- Language: Makefile
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Installation
```bash
make deps
make install
```
## USAGE
Create a `config.toml` file as follows:
```toml
# filename: config.toml
[database]
user = "root"
password = "toor"
server = "localhost"
port = "3306"
database = "MyDatabase"
```
Then you can use it:
```bash
mygosql USAGE:
-config string
config.toml file (default "./config.toml")
-query string
Query to perform
```
There are not much functions supported yet:
```bash
➜ 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 |
+---------------------+
```
## Building
```bash
make all
```