paul bennett

mysqldump to text file

Posted on: August 4, 2008

Seeing as this is a bit of a pain to find, the correct syntax for exporting data and tables from a database is:

mysqldump -u username -p [database name] [table name] > [filename]

mysqldump will then ask you for your password and will then create the output file for you in the location your specify.

Note that mysqldump puts the file into the folder you’re executing from unless you specify otherwise.

Leave a comment

Archives