MYSQL database backup and recovery mysqldump-h host name-P port-u username-p password (-database) database Name> file name. SQL backup MySQL database command mysqldump-hhostname-uusername-ppassword databasename> backupfile. the SQL backup MySQL database is in the format of a table with deletion, so that the backup can overwrite the existing database without the need to manually delete the original database. Mysqldump -- add-drop-table-uusername-ppassword databasename> backupfile. SQL www.2cto.com directly compresses and backs up the MySQL database mysqldump-hhostname-uusername-ppassword databasename | gzip> backupfile. SQL .gz to back up a MySQL database) table mysqldump-hhostname-uusername-ppassword databasename specific_table1 specific_table2> backupfile. SQL simultaneously backs up multiple MySQL databases mysqldump-hhostname-uusername-ppassword-databases databasename1 databasename2 databasename3> multibackupfile. SQL only backs up the database structure mysqldump-no-data-databases databasename1 databasename2 databasename3> structurebackupfile. all databases on the SQL www.2cto.com Backup Server mysqldump-all-databases> allbackupfile. SQL command for restoring MySQL database mysql-hhostname-uusername-ppassword databasename <backupfile. SQL restore compressed MySQL database gunzip <backupfile. SQL .gz | mysql-uusername-ppassword databasename transfers the database to the new server mysqldump-uusername-ppassword databasename | mysql-host = *. *. *. *-C databasename