Backup MySQL Database: Difference between revisions

From James's Wiki
Jump to: navigation, search
Created page with " back it up with: mysqldump -u <username> -p<password> <database name> > /media/temp/<database name> NOTE: there is no space between -p and the password restore: mysql -u..."
 
(No difference)

Latest revision as of 15:57, 17 June 2018

back it up with:

mysqldump -u <username> -p<password> <database name> > /media/temp/<database name>

NOTE: there is no space between -p and the password

restore:

mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]

Source: http://webcheatsheet.com/sql/mysql_backup_restore.php