Backup and Restore a Single Table with mysqldump

It is sometimes useful to backup a single table from a MySQL database and re-load it on a different database. You can do so with the following operations:

To backup:

mysqldump original_db table_name > table.sql

To restore:

mysql new_db < table.sql

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>