Backing up MYSQL databases using mysqldump – HahA! – Easier than it looked.

This worked for me:
Back up:
mysqldump -u USERNAME DATABASE > BACKUP-FILENAME -p
Then you have to type the mysql user’s password, and voila a dump file is created. I named my file something.sql .
Now to import that file, I will test the following:
mysql -u USERNAME -p DATABASE < BACKUP-FILENAME
Yes, it works. My database appeared to be completely restored in a test.

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Leave a reply