2

Is it possible to Export a MySQL to a CSV using the command line in UNIX?

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

1 Comment

you almost beat the 30 second rule - they should award badges for that type of victory
1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.