How to backup and restore your data with MysqlDump

Simple backup: From one database, to a simple sql file. mysqldump -u [username] -p [password] [databasename] > [backupfile.sql] Backup specific tables One database, several specified tables, to a single sql file. mysqldump -u [username] -p [password] [databasename] [table1 table2 ....] > [backupfile.sql] Backup multiple databases Multiple databases, to a single sql file. mysqldump -u [username] -p [password] --databases [database1 database2...] > [backupfile.sql] Backup all databases All databases found in connection, to a single file.
Read more...