开发者

Export MySQL to CSV using UNIX

开发者 https://www.devze.com 2022-12-24 03:08 出处:网络
Is it possible to Export a My开发者_JAVA技巧SQL to a CSV using the command line in UNIX?http://dev.mysql.com/doc/refman/5.1/en/mysqldump.htmlIf you have Ruby, you can use the mysql2xxxx gem

Is it possible to Export a My开发者_JAVA技巧SQL to a CSV using the command line in UNIX?


http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html


If you have Ruby, you can use the mysql2xxxx gem

gem install mysql2xxxx
mysql2csv --username=root --password=password --execute "select * from mytable" > mytable.csv

It's not as fast as mysqldump, but you don't need to be on the same computer as the MySQL server. It also provides mysql2xml and mysql2json.

0

精彩评论

暂无评论...
验证码 换一张
取 消