MySQL笔记-Slave_IO_Running:No【Could ... ... in binary log index file (server_errno=1236)】
生活随笔
收集整理的這篇文章主要介紹了
MySQL笔记-Slave_IO_Running:No【Could ... ... in binary log index file (server_errno=1236)】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這里主要是做主備的時候會出現這種問題:
一點要確定主庫的binlog.000054與從庫的一樣的。
本人遇到這問題的原因是在my.cnf中:
[mysql] #pid_file=/u01/mysql3306/run/mysqld.pid #pid_file=/u01/mysql3306/data/localhost.localdomain.pid host=192.168.79.136使用mysql總是連接到136這個從庫,導致主庫中binlog找不到,這一點要注意。
?
在主庫中查看:
mysql> show master status; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 4 Current database: *** NONE ***+---------------+----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +---------------+----------+--------------+------------------+-------------------+ | binlog.000054 | 154 | | | | +---------------+----------+--------------+------------------+-------------------+ 1 row in set (0.00 sec)其中對應的文件為:
?
即可解決!在從庫中查看。
mysql> show slave status\G; *************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 192.168.79.134Master_User: rep1Master_Port: 3306Connect_Retry: 60Master_Log_File: binlog.000054Read_Master_Log_Pos: 154Relay_Log_File: relaylog.000002Relay_Log_Pos: 317Relay_Master_Log_File: binlog.000054Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0Last_Error: Skip_Counter: 0Exec_Master_Log_Pos: 154Relay_Log_Space: 517Until_Condition: NoneUntil_Log_File: Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error: Last_SQL_Errno: 0Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1Master_UUID: 7845f9a7-96be-11ea-b572-000c29654169Master_Info_File: /u01/mysql3306/data/master.infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State: Slave has read all relay log; waiting for more updatesMaster_Retry_Count: 86400Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: 1 row in set (0.00 sec)ERROR: No query specifiedmysql> mysql>?
總結
以上是生活随笔為你收集整理的MySQL笔记-Slave_IO_Running:No【Could ... ... in binary log index file (server_errno=1236)】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QtJava笔记-Qt与Java进行SS
- 下一篇: PHP笔记-平润年判断例子