Automatic backup MySQL 5.0 has three scenarios:
Backup Scenario One: generate a complete. sql file directly through the mysqldump command
Step 1: Create a batch
(Note: Root is the MySQL default user name, AAAAAA is the MySQL password, bugtracker is the database name)
------------Mysql_ Backup.bat--------------------------------------------------------------------------------------
D:
cd d:/appserv/mysql/bin
mysqldump-uroot-paaaaaa bugtracker > e:/database/mysql_bugtracker_backup/ Bugtracker_back.sql
exit
Step 2: Create a scheduled task
"Start"--> "Control Panel"--> "Administrative Tools"--> "Task Scheduler"
"Create a Basic Task"-->---> "daily" (note the time after setting)-->----"Start a program"--> "Browser" (Locate select the batch you just created Processing Mysql_backup.bat)-->---> "Finish"
The corresponding Restore method
To create a process:
----------Mysql_restore.bat-------
D:
cd d:/appserv/mysql/bin
mysql-uroot-paaaaaa bugtracker < e:/database/mysql_bugtracker_backup/ Bugtracker_back.sql
exit
Double-click it to automatically perform a restore
Backup scenario Two: Through the Xcopy command, directly to the MySQL data directory of the corresponding database all the files copy out
To create a batch process:
xcopy D:/appserv/mysql/data/bugtracker e:/database/mysql_bugtracker_backup/bugtracker//e/h/d/y/r/v
exit
The corresponding Restore method
Copy the BugTracker folder in the E:/database/mysql_bugtracker_backup directory directly to the D:/appserv/mysql/data directory and cover all the BugTracker folders in the directory.
Backup Scenario Three: Install Navicat for MYSQL tool, set up automatic backup through its Schedule feature
Schedule--> New Batch Job
Select your DB (Eg:bugtracker) in the new pop-up page, and then in the right-hand panel (Available Jobs) you will see "Backup BugTracker" and double-click it to appear on the bottom panel---
Attach a few pictures (full procedure)
First step:
Second Step
Third Step
Fourth Step
Fifth Step
Sixth step
Seventh Step
The corresponding restore method:
Locate the latest. psc file in the above directory and then restore it via the Navicat for Mysql tool
Attach some pictures of the procedure
First step
Part II
Third Step
Fourth Step
Fifth Step
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.