#Mysql: Backup and Restore Mysql Backup and restore through command line. Backup mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql ##Restore mysql -u root -p[root_password] [database_name] < dumpfilename.sql