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?
Mysql – Is it possible to take the table level backup in thesql using any of the script
backupMySQLmysqladminscripting
Related Question
- Mysql – Shell script for backup binlog files for every 8 hours in MySQL
- Sql-server – Script to backup all databases
- Sql-server – How to take SQL Server databases backup using .bat script file with time stamp
- Mysql – How to take a full backup from MySQL without any System tables
- Mysql – restore a MySQL table from a file (non-sql) backup
- Mysql – How to take single database backup using thesqlbackup command in Mysql 8.0.18 version DB
Best Answer
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>>
signReference:
https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html https://stackoverflow.com/questions/8228116/mysqldump-tables-from-different-databases