Jump to content

MYSQL database automatted backup


JasonF

Recommended Posts

Thanks Adam

 

I created a .bat file with the following in it and it works great. Set it up for a scheduled task daily.

 

cd C:\Program Files\MySQL\MySQL Server 4.1\bin
mysqldump.exe -u*dbuser* -p*dbpass* *dbname* > *location and name of file*

 

In that example, replace *dbuser*,*dbname* and *dbname* with the mysql database info and *location and name of backup file* with the location and name of the sql backup file. Here is an example:

 

cd C:\Program Files\MySQL\MySQL Server 4.1\bin
mysqldump.exe -umyusername -pmypassword tcadmindb > E:\Documents and Settings\Administrator\Desktop\tcadmin_sql_backup.sql

Link to comment
Share on other sites

  • 1 month later...

Just seen this and its an excellent way of doing it. Having a slight problem with it though.

 

My Batch file

cd C:\wamp\mysql\bin

mysqldump.exe -umyuser -pmypassword tcadmin2 > E:\backup\tcadmin\tcadmin_sql_backup.sql

 

Is giving the error

'mysqldump.exe' is not recognized as an internal or external command,

operable program or batch file.

 

But it's in that folder, I checked.

Can anyone suggest anything to help?

Link to comment
Share on other sites

For your example your username should be myuser and password should be mypassword and database name is tcadmin2. Just want to make sure you have that set correctly. Also is that the same MYSQL install that TCAdmin is using?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use