MySQL Report 1236 Error resolution method

Source: Internet
Author: User

MySQL slave status as follows, found IO thread is no status, and reported 1236 error code


mysql> show slave status\g*************************** 1. row ****************                slave_io_ state:                    Master_Host: 10.0.0.20                   Master_User: rep                   Master_Port: 3307                 Connect_Retry: 60               Master_Log_File:  mysql-bin.000001          read_master_log_pos: 4                relay_log_file: relay-bin.000001                 Relay_Log_Pos: 4         Relay_Master_Log_File: mysql-bin.000001              Slave_IO_Running: No             Slave_SQL_Running: Yes               Replicate_Do_DB:            Replicate_Ignore_DB: mysql            replicate_do_table:        replicate_ignore_table:        Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                     last_errno: 0                    last_ error:                   skip_counter: 0          exec_master_log_pos:  4              relay_log_space:  107              until_condition:  none               until_log_ file:                  Until_log_pos: 0           master_ssl_allowed:  no           master_ssl_ca_file:             Master_SSL_CA_Path:                Master_SSL_Cert:              Master_SSL_Cipher:                 master_ssl_key:         seconds_behind_master:  NULLMaster_SSL_Verify_Server_Cert: No                 Last_IO_Errno: 1236                 Last_IO_Error: Got fatal error 1236  from master when reading data from binary log:  ' Could not  Find first log&nbsP;file name in binary log index file '                 Last_SQL_Errno: 0                last_sql_error:   replicate_ignore_server _IDS:              MASTER_SERVER_ID:  31 row in set  (0.00 SEC)

Solutions

Log on to the master to do the following, and record the value of the file_zize corresponding to 107

mysql> Reset Master; Query OK, 0 rows affected (0.11 sec) mysql> Show Master logs;+------------------+-----------+| Log_name | File_size |+------------------+-----------+|       mysql-bin.000001 | 107 |+------------------+-----------+1 row in Set (0.00 sec)

Log on to the slave end to do the operation, the value of Master_log_pos is set to 107

mysql> stop slave; query ok, 0 rows affected  (0.00 sec) mysql> change master to  master_log_pos=107; query ok, 0 rows affected  (0.11 sec) mysql> start slave; query ok, 0 rows affected  (0.00 sec) mysql> show slave status\g  1. row ***************************                slave_io_state: waiting for master  to send event                   Master_Host: 10.0.0.20                   Master_User: rep                   master_port: 3307                 connect_retry: 60               Master_log_file: mysql-bin.000001          read_master_ log_pos: 107                relay_log_file: relay-bin.000002                 relay_log_pos: 253        relay_master_ log_file: mysql-bin.000001              Slave_io_running: yes            slave_sql_ Running: yes              replicate _do_db:           replicate_ignore_db: mysql            Replicate_Do_Table:         replicate_ignore_table:       replicate_wild_do_table:    replicate_wild_ignore_table:                     Last_Errno: 0                    Last_Error:                   Skip_Counter: 0           Exec_Master_Log_Pos: 107               Relay_Log_Space: 403               Until_Condition: None                Until_Log_File:                  Until_Log_Pos: 0            Master_SSL_Allowed: No            master_ssl_ca_file:            master_ssl_ca _path:               master_ssl_ cert:             master_ssl_cipher:                 master_ssl_key:          seconds_behind_master: 0master_ssl_verify_server_ cert: no                last_io_errno: 0                 Last_IO_Error:                 Last_SQL_Errno: 0                Last_SQL_Error:    Replicate_Ignore_Server_Ids:               Master_Server_Id: 31 row in set  (0.00 SEC)

Finally, the master-slave synchronization restores the normal ^_^


This article is from the "Galloping Camel" blog, make sure to keep this source http://wn2100.blog.51cto.com/9915310/1954164

MySQL Report 1236 Error resolution method

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.