Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 487 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 487 Bytes

mysql2json

Dumping MySQL tables to JSON.

Installation

Install mysql2json dependency (if not already installed):

$ go get github.com/go-sql-driver/mysql

Then, install in the usual Go way:

$ go get github.com/XuefengHuang/mysql2json

Usage

import "github.com/XuefengHuang/mysql2json"

mysql2json.Getjson(username, password, address, database, sql_statement)

Example

mysql2json.Getjson("root", "123456", "127.0.0.1", "test", "select * from test")