How to backup MySQL database on Windows?

I have WampServer 2.0 that is installed on Windows on my laptop.

I am running the application that I wrote. The application works with a MySQL database.

I would like to periodically back up this database.

How can I do that?

How can I detect cron on windows?

+5
source share
4 answers

The rough equivalent crontab -efor Windows is the command at, as in:

at 22:00 /every:M,T,W,Th,F C:\path\to\mysql\bin\mysqldump.exe ...

Running the command atitself lists the tasks that you created using at.

The mysqldump documentation is here .

+8

MySQL - mysqldump:

  1. Windows.
  2. mysqldump

    cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"

  3. MySQL.

mysqldump.exe --user=YourUserName --password=YourPassword --host=localhost --port=3306 --result-file="Pathdump.sql" --databases "DatabaseName"

, , MySQL.

+1

bash script.

#!/bin/sh
mysqldump -uroot -ppwd --opt db1 > /sqldata/db1.sql
mysqldump -uroot -ppwd --opt db2 > /sqldata/db2.sql

cd /sqldata/
tar -zcvf sqldata.tgz *.sql
cd /scripts/
perl emailsql.pl

http://paulbradley.tv/38/

0

All Articles