Mysqldump some experience in the use of BACKUP commands

Source: Internet
Author: User

Text: often use the contact MySQL copy function of friends should be not unfamiliar with the mysqldump command, I recently also in the study of this piece of content, after a few days of testing, found that mysqldump use easy to meet a few problems, here to summarize and share with you, If there are different views welcome to Exchange study,

Software version, website download 5.5.53

Application scenario, mysqldump the primary MySQL server to get SQL statements and then restore to a blank MySQL server

Summary 1: If the master server is backed up with a non-root user with a password before restoring to the backup MySQL server, you must run the flush privileges command on the backup server or you can log on without a password. If you do not execute this command, when you make a backup of the MySQL server, the authentication fails for the rep user, and the IO process cannot connect to the master error.

Summary 2: For--master-data This parameter in mysqldump, if this parameter is used in the backup, when you restore the SQL statement to the slave MySQL server, you must first execute the change msater to of the four commands, that is, first specify the host PORT USER PASSWORD then restore the SQL statement, otherwise--master-data This command does not produce the actual use, slave will start from the default 107 location, resulting in errors, the SQL process is stopped, and you need to manually specify Binlog files and logs, so that the start Slave can see that the system automatically reads the correct binlog location and file. So you first specify the master four parameters, then restore the SQL statement, and then turn on slave.


This article is from the "loss is Blessing" blog, please be sure to keep this source http://dragonfly.blog.51cto.com/2928582/1872737

Mysqldump some experience in the use of BACKUP commands

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.