Suman.hassan95
Suman.hassan95

Reputation: 4005

Backup and restore database

i am using mysql as my database server. I want to have a backup of database and restore them in case of machine crash. I am enetering the data through a GUI i Windows. I googled and read so much about automysqldump but i couldn't find the downloadable exe , i have downloaded the .sh file but i am very confused about how to use it. Please help me about this issue. I don't want to know how to use automysqldump but want to know any to backup and restore database using windows.

Upvotes: 0

Views: 1248

Answers (3)

jamesTheProgrammer
jamesTheProgrammer

Reputation: 1777

I am using WAMP 2.2. It is located here:

C:\wamp\bin\mysql\mysql5.5.20\bin

Upvotes: 0

Nishant
Nishant

Reputation: 55866

  1. Make sure you can run mysqldump command in command prompt
  2. make a backup.bat file, and write this command in that mysqldump -u username -ppassword -h host databasename > C:\mybackupdata.sql where username is your login-name for MySQL and password is the password that you use to login to MySQL. host will be localhost in your case.
  3. Set it as scheduled task. It's very easy to do. See here http://support.microsoft.com/kb/308569

You may set it for daily for daily backup.


Edit Added more details as per comment

mysqldump is utility program gets installed when you install mysql server. You may try running this command on your console mysqldump -u username -ppassword -h host databasename > C:\mybackupdata.sql it should work.

I am assuming you have MySQL server installed on your machine and you can access your DB from command prompt using mysql -u username -ppassword if you get error like command not found most likely the path is not set. And you need to add mySQL's bin directory to your system path.

Upvotes: 1

jyoseph
jyoseph

Reputation: 5455

I personally use Navicat to create scheduled backups. You can try the program for free for 30 days to see if it meets your needs.

Here's a tutorial on how to use the backup feature in navicat. It's super simple, set it and forget it.

fyi, I'm not affiliated w/ navicat in any way.

Upvotes: 0

Related Questions