Backup and Restore MySQL via MySQLdump

To backup: # mysqldump -u root -p[password] database_name > database_name_backup.sql [password] should be placed immediately after -p. For example: -pmypassword. database_name_backup.sql would be created in the root directory. To restore: Create an appropriately named database on the target machine Load the file using the mysql command: # mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql] To … Continue reading “Backup and Restore MySQL via MySQLdump”