Commands to back up the MySQL database
- - - > backupfile.sql
Backing up the MySQL database to a format with a delete table
Backing up the MySQL database is a format with a delete table that allows the backup to overwrite the existing database without having to manually delete the existing database.
-–add-drop-table--> Backupfile.sql
Compress the MySQL database directly backup
- - - | > backupfile.sql.gz
Back up a MySQL database (some) table
- - - > backupfile.sql
Back up multiple MySQL databases at the same time
- - - > multibackupfile.sql
Backing up the database structure only
Mysqldump–no-> structurebackupfile.sql
Back up all databases on the server
mysqldump–all-> allbackupfile.sql
Commands to restore MySQL database
- - - < Backupfile.sql
Restore a compacted MySQL database
< | - -ppassword databasename
To transfer a database to a new server
- - | Mysql–host=*. *. *. * - C DatabaseName
Common commands for MySQL database backup and restore