Synchronization from the slave database fails due to the restart of the Mysql master database server (Gotfatalerror1236fr

Source: Internet
Author: User
A vps will be accidentally restarted once in the last week or so. Sadly, this vps is built on the Mysql master database, after the machine is restarted, "Gotfatalerror1236frommasterwhenreadingdatafrombinarylog: Clientrequestedmastertostartreplicatio" appears during Database Synchronization from the database.

A vps will be accidentally restarted once in the last week or so. Sadly, this vps is built on the Mysql master database, after the machine is restarted, "Got fatal error 1236 from master when reading data from binary log: 'client requested master to start replicatio" may occur during Database Synchronization from the database.

A vps will be accidentally restarted once in the last week or so. Sadly, this vps is built on the Mysql master database, after the machine is restarted, the following error occurs during Database Synchronization from the slave Database: "Got fatal error 1236 from master when reading data from binary log: 'client requested master to start replication from impossible position' error.

At this time, the status is: Execute on the slave DatabaseSHOW SLAVE STATUS;Will appearSlave_IO_Running: No. And can find

Solution (applicable to lnmp 0.9 ):
  1. Log on to the master database server
  2. Run/usr/local/mysql/bin/mysqlbinlog/usr/local/mysql/var/mysql-bin.000023> test.txt
  3. Less test.txt
  4. Find the latest position id. For details, refer:
  5. Run stop slave on the SLAVE Database Server mysql;
  6. CHANGE MASTER TO MASTERHOST = 'master database ip', MASTERUSER = 'synchronize user', MASTERPASSWORD = 'synchronized password', MASTERLOGFILE = 'mysql-bin.000023', MASTERLOG_POS = 130216;
  7. Slave start;
  8. Now let's look at the show slave status; then we can see that the synchronization is normal.

Original article address: the slave Database Synchronization fails due to the restart of the Mysql master database server (Got fatal error 1236 from mas). Thank you for sharing it with me.

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.