Submitted by Kiran on Thu, 02/25/2010 - 18:36
The following command create two files in /tmp folder mytable.sql and mytable.txt. The sql file have the table creation schema and the txt file have the records of the mytable table with comma delimited fields.
$mysqldump -u user -p --fields-terminated-by=',' --tab=/tmp mydatabase mytable
NOTE: --tab option works only if the mysql client and the mysql server are running on the same machine.
Omitting the 'mytable' part in the above command will export all tables in the database, one table per file
»
- Kiran's blog
- 1063 reads













Post new comment