Backup MySQL Database

From James's Wiki
Revision as of 15:57, 17 June 2018 by Ractive (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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