I am new to MySQL and I am in need of the script which is taking backup of multiple tables from the multiple databases in single file in MySQL?

1 Answer 1


To dump only specific tables from a database, name them on the command line following the database name:

mysqldump my_database table1 table3 table5 > dump.sql

To dump only specific tables from multiple database, use mysqldump again, but append to the end of the previously created file:

mysqldump my_database2 table1 table3 table5 >> dump.sql Note the >> sign


https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html https://stackoverflow.com/questions/8228116/mysqldump-tables-from-different-databases

  • Thanks for the response Vladimir and is there any script to automate this thing
    – Azhagiri
    Mar 19, 2016 at 10:31
  • you should try atleast first . No one can give you ready and cooked food to eat. We can give you items to cook Jun 23, 2017 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.