https://github.com/mitcelab/mysql2csv
Command line tool (binaries available for download) for exporting MySQL query results to CSV files.
https://github.com/mitcelab/mysql2csv
csv mysql
Last synced: 2 months ago
JSON representation
Command line tool (binaries available for download) for exporting MySQL query results to CSV files.
- Host: GitHub
- URL: https://github.com/mitcelab/mysql2csv
- Owner: mitcelab
- Created: 2017-11-24T00:25:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-27T17:07:28.000Z (about 8 years ago)
- Last Synced: 2024-11-26T04:03:30.250Z (over 1 year ago)
- Topics: csv, mysql
- Language: Go
- Size: 1.95 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mysql2csv
It's surprisingly hard to export a MySQL query to a CSV file. You can use `SELECT ... INTO OUTFILE ...` but
that requires special file permissions; on the other hand, third-party clients such as MySQL Workbench and
SequelPro are slow and often run into encoding problems.
#### install
> go install github.com/mitcelab/mysql2csv
#### usage
> mysql2csv --user X --pass Y --host Z --dbname btctalk --query "SELECT * FROM User"
By default, it prints to STDOUT where you can easily pipe it through gzip/bzip2, but you can also specify
a output file with the `--output` option.