my sql数据库备份与恢复
This is useful if you only want to get an export of the structure of a table!
-opt
The same thing 一 qudatabase | mysql 一 host = remote host - C database
Since mysqldump is exporting full SQL statements, it's easy to import data with mysql client:
Shell > mysqladmin create target dbname
Shell > mysql target dbname < backup - file, sql
Based on previous article methods, you can implement automatic backups by adding batch commands. It is only because the name of the backup file in the batch command is special for the name of the backup file, so special collation.
Copy the date folder backup
Imaginary environment:
MySQL installation location: C: \ MySQL
BBS database name: BBS
Database backup destination: C: \ dbbak \
Create a new dbbak. Bat, and write the following code
*1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *»L* *»L* xlx ✓r* xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx ✓!> xTs
Code Start *************************
* * * *
Net stop mysql
Xcopy c: \ mysql \ data \ BBS \ *. c: \ db bak \ BBS \ % date:
~ 0 % \ / S/I
Net start mysql
*»L* *»L* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *1* *»L* *»L* xlx ✓!> ✓r* xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx xlx ✓!> xTs
Code End ******
mysql数据库备份与恢复 来自淘豆网www.taodocs.com转载请标明出处.