Categories
Uncategorized

MySQL – mysqldump

  1. Dump the whole database:
mysqldump -u username -ppassword database_name  > the_whole_database_dump.sql

2. Dump a single table:

mysqldump -u username -ppassword database_name table_name > single_table_dump.sql

3. Dump only rows that meet a specific criteria, you can add ‘where’ option to your mysqldump command:

mysqldump -u username -ppassword database_name table_name --where="date_created='2013-06-25'" > few_rows_dump.sql

Leave a Reply

Your email address will not be published. Required fields are marked *