MySQL Forums
Forum List  »  Newbie

Thank You for the mysqldump Suggestion
Posted by: Doug Pruiett
Date: April 19, 2013 11:33AM

I bit the bullet and tested the mysqldump command as suggested. It took a while to get the syntax correct. Spacing is important I discovered. But I ended up with the following to backup my "wordpress" database:

@echo off
if exist C:\MySQLBackups\mysqlbak.sql del C:\MySQLBackups\mysqlbak.sql
CD C:\Program Files\MySQL\MySQL Server 5.1\bin\
mysqldump -u wordpressuser -pMyPassword wordpress > C:\MySQLBackups\mysqlbak.sql
dir C:\MySQLBackups\mysqlbak.sql

I scheduled this to run each day at 1800.

The restore syntax I was given is as follows. I have not tried it for fear of grunging something. Can anyone suggest a good and SAFE way to test the restore???

mysql --user wordpressuser --password=MyPassword wordpress < C:\MySQLBackups\mysqlbak.sql

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.