Solution to non-synchronization of mysql Master/Slave Databases

Source: Internet
Author: User

The following error occurs: "Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file', or the Master/Slave database is not synchronized due to data clearing. The solution is as follows:

First, go to slave and execute: "slave stop;" to stop slave database synchronization;

Run "flush logs;" in the master to clear logs;

Then execute "show master status;" in the master to check the status of the master database, mainly the log file and position;

Return TO the slave and run: "change master to MASTER_LOG_FILE = 'Log-bin.000004 ', MASTER_LOG_POS = 106;". The file and location correspond TO those in the master;

Finally, Run "slave start;" in slave to start 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.