MYSQL启动错误之[ERROR] Failed to open log (file './mysql-bin.000039', errno 2)
2016-04-07 17:36
666 查看
今天收到报警说MYSQL的slave挂掉了,检查日志,发现是因为之前搭建主从的时候没有将主库的event传过来,而在主库又更新了event的属性,在参数文件中忽略掉这个错误:
max_connections = 1000
max_connect_errors = 10
table_open_cache = 8096
#external-locking
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 8M
sort_buffer_size = 256M
join_buffer_size = 8M
thread_cache_size = 8
slave-skip-errors=1539
接着重启数据库,发现启动报错:
160407 17:19:44 InnoDB: Initializing buffer pool, size = 1.0G
160407 17:19:44 InnoDB: Completed initialization of buffer pool
160407 17:19:45 InnoDB: Started; log sequence number 11 2950076940
/usr/local/mysql/bin/mysqld: File './mysql-bin.000039' not found (Errcode: 2)
160407 17:19:45 [ERROR] Failed to open log (file './mysql-bin.000039', errno 2)
160407 17:19:45 [ERROR] Could not open log file
160407 17:19:45 [ERROR] Can't init tc log
160407 17:19:45 [ERROR] Aborting
不知道为什么,从库上会报这个错
解决:将从库上的log-bin 注释掉了,重启成功
如果是主库这样做会有风险的
max_connections = 1000
max_connect_errors = 10
table_open_cache = 8096
#external-locking
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 8M
sort_buffer_size = 256M
join_buffer_size = 8M
thread_cache_size = 8
slave-skip-errors=1539
接着重启数据库,发现启动报错:
160407 17:19:44 InnoDB: Initializing buffer pool, size = 1.0G
160407 17:19:44 InnoDB: Completed initialization of buffer pool
160407 17:19:45 InnoDB: Started; log sequence number 11 2950076940
/usr/local/mysql/bin/mysqld: File './mysql-bin.000039' not found (Errcode: 2)
160407 17:19:45 [ERROR] Failed to open log (file './mysql-bin.000039', errno 2)
160407 17:19:45 [ERROR] Could not open log file
160407 17:19:45 [ERROR] Can't init tc log
160407 17:19:45 [ERROR] Aborting
不知道为什么,从库上会报这个错
解决:将从库上的log-bin 注释掉了,重启成功
如果是主库这样做会有风险的
相关文章推荐
- 人机五子棋(AI算法有瑕疵)
- MainWindow.h
- mybait的文件配置
- 华为RAID 1阵列卡设置教程图文详解
- 进程 、进程组、会话、控制终端之间的关系 (转载 http://blog.csdn.net/yh1548503342/article/details/41891047)
- SCU3033 Destroying a Painting(最小费用最大流)
- 涂鸦|绘制|draw|paint|view的绘制|undo|redo|恢复|撤销|保存
- apt-get couldn't be verified because the public key is not available: NO_PUBKEY XXX
- 7.5 mail_copy函数:向文件系统写入邮件
- 7.4 deliver_mailbox_file函数:以mbox格式接收邮件
- 7.4 deliver_mailbox_file函数:以mbox格式接收邮件
- 7.3 deliver_maildir函数:以Maildir格式接收邮件
- Ehcache项目启动时报Update check failed异常的解决方法
- 6.6 移信和 fairness策略
- 6.3.3 sendmail的别名文件和.forward文件
- RAID阵列的迁移
- LeetCode(31)-Factorial Trailing Zeroes
- LeetCode(31)-Factorial Trailing Zeroes
- LeetCode(31)-Factorial Trailing Zeroes
- 关于快速报错fail-fast想说的之fail-fast的避免方法(二)