MySQL5.6 backup and recovery command, mysql5.6 backup and recovery

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.