MySQL 1236 error Solution

Source: Internet
Author: User

MySQL 1236 error solution due to the master server abnormal reboot, resulting in an error from, the error is as follows: www.2cto.com show slave status error: mysql> show slave status \ GMaster_Log_File: mysql-bin.000288Read_Master_Log_Pos: 627806304Relay_Log_File: mysql-relay-bin.000990Relay_Log_Pos: 627806457Relay_Master_Log_File: mysql-bin.000288Slave_IO_Running: NoSlave_ SQL _Running: YesExec_Master_Log_Pos: 627806304Relay_Log_Space: 627806663 ...... last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'client requested master to start replication from impossible position 'mysql Error log: tail/data/mysql/mysql-error.log111010 17:35:49 [ERROR] Error reading packet from server: Client requested master to start replication from impossible position (server_errno = 1236) 111010 17:35:49 [ERROR] Slave I/O: Got fatal error 1236 from master when reading datafr Om binary log: 'client requested master to start replication from impossibleposition ', Error_code: 1236111010 17:35:49 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000288 ', position 627806304 [root @ db1 ~] # Mysqlbinlog/data/mysql/binlog/mysql-bin.000288> mysql-bin.000288. SQL less mysql-bin.000288. SQL to see the last part # at 627625495 #111010 16:35:46 server id 1 end_log_pos 627625631 Query thread_id = 45613333exec_time = 32758 error_code = 0 SET TIMESTAMP = 1318289746 /*! */; Delete from freeshipping_bef_update where part = 'ar-4006WLM 'and code = ''/*! */; # At 627625631 #111010 16:35:46 server id 1 end_log_pos 627625751 Query thread_id = 45613333exec_time = 32758 error_code = 0 set timestamp = 1318289746 /*! */; Delete from shippingFee_special where part = 'ar-4006WLM '/*! */; DELIMITER; # End of log fileROLLBACK/* added by mysqlbinlog */;/*! 50003 SET COMPLETION_TYPE = @ OLD_COMPLETION_TYPE */; locate the position closest to error 627655136, Which is 627625631. return to the Server Load balancer instance and change master to point postion to this location. mysql> stop slave; Query OK, 0 rows affected (0.00 sec) mysql> change master to master_log_file = 'mysql-bin.000288 ', master_log_pos = 627625631; Query OK, 0 rows affected (0.06 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) check mysql> show slave status \ G **************************** 1. row ************************** Slave_IO_State: Queueing master event to the relay logMaster_Host: 192.168.21.105Master _ User: repMaster_Port: 3306Connect_Retry: 10Master_Log_File: mysql-bin.000289Read_Master_Log_Pos: Connector: mysql-relay-bin.000003Relay_Log_Pos: Connector: mysql-bin.000289Slave_IO_Running: YesSlave_ SQL _Running: Yes master-slave synchronization is normal, the same way to fix other slave machines.

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.