Logical backups are typically used for data migrations or data volumes, and logical backups are backed up by data exports.
If you need to export all databases, the command is as follows:
Mysqldump-uroot-p--single-transaction-a>all.sql
If you want to export only a few of these databases, use the following command:
Mysqldump-uroot-p--single-transaction-b test1 Test2>test1_test2.sql
If you are exporting a few tables in a library, you can use the following command:
Mysqldump-uroot-p--single-transaction-b test1--table table1 table2>table1_table2.sql
When you only need to export the table structure, use the following command:
Mysqldump-uroot-p--skip-triggers>all.sql
When you only need to export a stored procedure, use the following command:
Mysqldump-uroot-p-q-rtdn--skip-triggers
If you only need to export the trigger, you can use the following command:
Mysqldump-uroot-p-q-tdn--triggers
To export only the event is, take the following command:
Mysqldump-uroot-p-etdn--skip-triggers
To export data only, use the following command:
Mysqldump-uroot-p-Q--single-transaction--skip-triggers-t
To create a new slave online, please use the following command:
Mysqldump-uroot-p-Q--single-transaction--master-data=2-a >all.sql
MySQL logical backup