Could not find first log file name in binary log index file
来源:互联网 发布:淘宝订单号查询在哪里 编辑:程序博客网 时间:2024/05/18 22:49
MySql Slave报警,错误如下:
Relay_Master_Log_File: mysql-bin.0506435
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
Master上查看binlog的信息:
mysql> show variables like 'log_bin%';
+---------------------------------+---------------------------------+
| Variable_name | Value |
+---------------------------------+---------------------------------+
| log_bin | ON |
| log_bin_basename | /data/logs/mysql-bin |
| log_bin_index | /data/logs/mysql-bin.index |
| log_bin_trust_function_creators | ON |
| log_bin_use_v1_row_events | OFF |
+---------------------------------+---------------------------------+
mysql>system more /data/logs/mysql-bin.index
/data/logs/mysql-bin.000001
对比发现从库读的binlog文件mysql-bin.0506435,不在/data/logs/mysql-bin.index 中。
原来主库刚才重启过,调整了log_bin_basename,导致重新生成了二进制文件。
由于事故发生在凌晨,此时没有数据写入,也没有收到主从延迟的报警。
所以就直接在slave 上change master 指向新的binlog文件。让从库恢复正常。
事后在用pt-table-checksum ,pt-table-sync 进行数据校验和修复。
Relay_Master_Log_File: mysql-bin.0506435
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
Master上查看binlog的信息:
mysql> show variables like 'log_bin%';
+---------------------------------+---------------------------------+
| Variable_name | Value |
+---------------------------------+---------------------------------+
| log_bin | ON |
| log_bin_basename | /data/logs/mysql-bin |
| log_bin_index | /data/logs/mysql-bin.index |
| log_bin_trust_function_creators | ON |
| log_bin_use_v1_row_events | OFF |
+---------------------------------+---------------------------------+
mysql>system more /data/logs/mysql-bin.index
/data/logs/mysql-bin.000001
对比发现从库读的binlog文件mysql-bin.0506435,不在/data/logs/mysql-bin.index 中。
原来主库刚才重启过,调整了log_bin_basename,导致重新生成了二进制文件。
由于事故发生在凌晨,此时没有数据写入,也没有收到主从延迟的报警。
所以就直接在slave 上change master 指向新的binlog文件。让从库恢复正常。
事后在用pt-table-checksum ,pt-table-sync 进行数据校验和修复。
0 0
- 'Could not find first log file name in binary log index file'的解决办法
- Could not find first log file name in binary log index file
- Mysql主从库不同步1236错误:could not find first log file name in binary....
- Could not Open Install.Log File解决方法
- Log to file in Qt.
- Path to log file not valid: log/mongrel.log问题
- log file
- Apache启动错误:No such file or directory httpd: could not open error log file......
- autosys log file name contains date
- Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find
- Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find
- 运行apache时,发生错误:could not open error log file /usr/local/apache/logs/error_log
- 用Fusion Log诊断"Could not load file or assembly"问题
- VisualSVN 启动失败 could not log pid to file 的解决办法
- 用Fusion Log诊断Could not load file or assembly问题
- Starting httpd: (13)Permission denied: httpd: could not open error log file
- Nginx出现could not open error log file (permission denied)报错
- nagios 报错Warning: Could not stat() check result file '/var/log/nagios/spool/checkresults'.解决
- Linux drop_caches
- java乱码问题
- ubuntu14下Arduino IDE无法打开串口的问题
- JavaWeb总结十二、Session
- OGC WMS WCS WFS WPS 三大协议简谈
- Could not find first log file name in binary log index file
- Spring autoWire resource Spring配置文件问题 自定义注解 并注入spring
- 关于if (!cin)
- OGRE地形初步
- qt 可开关的toggle按钮
- 获取Android设备唯一标识码
- Mysql时间调度器
- UE百度编辑器的使用
- Android根据图片路径获取图片名字