Mysql master-slave synchronization fails due to power failure

Source: Internet
Author: User
Tags mysql code

Mysql Master/slave synchronization cannot be synchronized due to power failure. Occasionally, mysql slave may have a replication error "cocould not parse relay log event entry" cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or s Lave's MySQL code. if you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'show SLAVE status' on this slave. first query the status show slave status \ G Master_Host: 192.168.2.51 Master_User: backupuser Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000078 Read_Master_Log_Pos: 984673998 Relay_Log_File: memcached-relay-bin.000039 Relay_Log _ Pos: 747157846 Relay_Master_Log_File: mysql-bin.000078 Slave_IO_Running: Yes Slave_ SQL _Running: No Skip_Counter: 0 Exec_Master_Log_Pos: 747157709 Relay_Log_Space: 984679197 if the master server is correct, you can reset the synchronization location of the slave server. The preceding commands can correspond TO: stop slave; change master to MASTER_LOG_FILE = 'mysql-bin.000078 ', MASTER_LOG_POS = 747157709; start slave; then use show slave status \ g to view the status. Master_Log_File: mysql-bin.000078 Read_Master_Log_Pos: 879029246 Relay_Log_File: memcached-relay-bin.000002 Relay_Log_Pos: 1336369 runtime: mysql-bin.000078 runtime: Yes runtime: Last_Errno: 0 Last_Error: skip_Counter: 0 Exec _ Master_Log_Pos: 748493843 Relay_Log_Space: 131871772 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 character: No character: Master_SSL_Cert: character: Master_SSL_Key: character: 339469. There is also a saying that the memory is not enough to generate. After some unnecessary processes are cleared to release the memory, stop slave; start slave; then, well, this is not the case I encountered, if the problem persists, try to release the memory.

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.