MySQL from library Last_io_error:got fatal Error 1236 from master when reading data from binary log: ' Could not ' find first log file n Ame in binary log index file ' error handling

Source: Internet
Author: User
Tags error handling

Years later. Check MySQL health and backup situation, log in to MySQL from the library to view the master-slave synchronization status

1Mysql>show slave status\g;2***************************1. Row ***************************3 slave_io_state:4Master_host:101.200.*.*5 Master_user:backup6Master_port:33067Connect_retry: -8Master_log_file:master-bin.0001139Read_master_log_pos:276925387TenRelay_log_file:mysql-relay.000001 OneRelay_log_pos:4 ARelay_master_log_file:master-bin.000113 - Slave_io_running:no - Slave_sql_running:yes the replicate_do_db: - replicate_ignore_db: - replicate_do_table: - replicate_ignore_table: + replicate_wild_do_table: - replicate_wild_ignore_table: +Last_errno:0 A Last_error: atSkip_counter:0 -Exec_master_log_pos:276925387 -Relay_log_space: - - Until_condition:none - Until_log_file: -Until_log_pos:0 in Master_ssl_allowed:no - Master_ssl_ca_file: to Master_ssl_ca_path: + Master_ssl_cert: - Master_ssl_cipher: the Master_ssl_key: * Seconds_behind_master:null $ Master_ssl_verify_server_cert:noPanax NotoginsengLast_io_errno:1236 -Last_io_error:got Fatal Error1236  fromMaster when reading data fromBinary log:'Could not find first log file name in binary log index file' theLast_sql_errno:0 + Last_sql_error: A Replicate_ignore_server_ids: theMASTER_SERVER_ID: + +master_uuid:e4a43da7-5b58-11e5-a12f-00163e003632 -Master_info_file:/home/data/mysql/Master.info $Sql_delay:0 $ Sql_remaining_delay:null -Slave_sql_running_state:slave have read all relay log; Waiting forThe slave i/O thread to update it -Master_retry_count:86400 the Master_bind: -Last_io_error_timestamp:170204 Ten: -: .Wuyi Last_sql_error_timestamp: the MASTER_SSL_CRL: - Master_ssl_crlpath: Wu Retrieved_gtid_set: - Executed_gtid_set: AboutAuto_position:0 $ 1Rowinch Set(0.00sec) -  - ERROR: -No query specified

Suddenly slave_io_running: The state becomes no

Workaround.

First, execute from the library

Stop slave;

View Master Library Master Status

1Mysql>show Master status\g;2***************************1. Row ***************************3File:mysql-bin.0001134Position:2769253875 binlog_do_db:6 binlog_ignore_db:7 Executed_gtid_set:8 1Rowinch Set(0.00sec)9 Ten ERROR: One No Query specified A  -Mysql>flush logs; -Query OK,0Rows Affected (0.11Sec

Refresh Binlog Log

Flush logs;

Post-refresh log will be +1

For example, the above file:mysql-bin.000113 will become file:mysql-bin.000114.

View Master Status again

1Mysql>show Master status\g;2***************************1. Row ***************************3File:mysql-bin.0001144Position: -5 binlog_do_db:6 binlog_ignore_db:7 Executed_gtid_set:8 1Rowinch Set(0.00sec)9 Ten ERROR: OneNo query specified

Then you don't need to switch to the from library in Operation Master.

Enter change MASTER to master_log_file= ' mysql-bin.000114 ', master_log_pos=120;

Execute start slave;

View from library status

1Mysql>show slave status\g;2***************************1. Row ***************************3Slave_io_state:waiting forMaster to sendEvent4Master_host:101.200.*.*5 Master_user:backup6Master_port:33067Connect_retry: -8Master_log_file:mysql-bin.0001149Read_master_log_pos:11314TenRelay_log_file:mysql-relay.000002 OneRelay_log_pos:11477 ARelay_master_log_file:mysql-bin.000114 - Slave_io_running:yes - Slave_sql_running:yes the replicate_do_db: - replicate_ignore_db: - replicate_do_table: - replicate_ignore_table: + replicate_wild_do_table: - replicate_wild_ignore_table: +Last_errno:0 A Last_error: atSkip_counter:0 -Exec_master_log_pos:11314 -Relay_log_space:11646 - Until_condition:none - Until_log_file: -Until_log_pos:0 in Master_ssl_allowed:no - Master_ssl_ca_file: to Master_ssl_ca_path: + Master_ssl_cert: - Master_ssl_cipher: the Master_ssl_key: *Seconds_behind_master:0 $ Master_ssl_verify_server_cert:noPanax NotoginsengLast_io_errno:0 - Last_io_error: theLast_sql_errno:0 + Last_sql_error: A Replicate_ignore_server_ids: theMASTER_SERVER_ID: + +master_uuid:e4a43da7-5b58-11e5-a12f-00163e003632 -Master_info_file:/home/data/mysql/Master.info $Sql_delay:0 $ Sql_remaining_delay:null -Slave_sql_running_state:slave have read all relay log; Waiting forThe slave i/O thread to update it -Master_retry_count:86400 the Master_bind: - Last_io_error_timestamp:Wuyi Last_sql_error_timestamp: the MASTER_SSL_CRL: - Master_ssl_crlpath: Wu Retrieved_gtid_set: - Executed_gtid_set: AboutAuto_position:0 $ 1Rowinch Set(0.00sec) -  - ERROR: -No query specified

MySQL from library Last_io_error:got fatal Error 1236 from master when reading data from binary log: ' Could not ' find first log file n Ame in binary log index file ' error handling

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.