MySQL5.6 backup and recovery command, mysql5.6 backup and recovery
Backup
Mysqldump-P 3010-h 130.51.2.24-uroot-proot zplatdb> backup. SQL
Restore
Recover to my local machine, because I have not set a password for this machine, the password is blank,-p there do not know fill in the token
Mysql-u root-p *** zplatdb <c: \ backup. SQL
In fact, you can:
Mysql-u root zplatdb <c: \ backup. SQL
In addition, you can also use the source command, which is simpler, but the time is much slower than mysqldump:
First, log on to mysql,
Mysql> use zplatdb
Mysql> source c: \ backup. SQL
Note: If the backup file is stored on drive C, try to remove the slash if an error is reported,c:backup.sql
.
Backup Functions
After the restoration, no recovery functions and stored procedures are found!
Note: The backup file backup. SQL is actually an SQL script, which can be opened directly. You can search for it. It contains all table statements and has no function!
The cause is the backup problem. To back up a function, you need:
Mysqldump-P 3010-h 130.51.2.24-uroot-proot zplatdb-R> backup. SQL
-R indicates that both table and function stored procedures are backed up.
There is no problem with source. You can restore functions and stored procedures as well.
Help:
Mysqldump-help
Refer:
Http://www.2cto.com/database/201211/168571.html
Reprinted please indicate the source:
This article is from: [ouyida3 blog]
2015.7.11
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.