The solution to the problem of Mysql master and slave library _mysql

Source: Internet
Author: User
Encountered such errors as: "Last_io_error:got fatal error 1236 from master when reading the data from binary log: ' Could ' is not find ' e name in binary log index file ' ", etc. or due to the clearing of data caused the master and slave library is not synchronized, the solution is as follows:

First enter the slave to execute: "Slave stop;" To stop synchronizing from the library;

Then go to Master to execute: "Flush logs;" To clear the log;

Then execute in master: "Show master status;" View the status of the main library, mainly log files and position;

Then go back to Slave and execute: "Change master to master_log_file= ' log-bin.000004 ', master_log_pos=106;", File and location corresponding to master;

Finally in the slave: "Slave start;" To initiate synchronization.
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.