mysql数据库重启失败,报错Binlog has bad magic number
2015-10-13 16:20
1666 查看
我的数据库版本是5.1.44,操作系统是redhat
今天启动数据报错,下面是错误日志,谁能帮忙看看,谢谢了
100316 10:58:47 mysqld_safe
Starting mysqld daemon with databases from /var/lib/mysql
100316 10:58:48 [Note] Plugin 'FEDERATED' is disabled.
100316 10:58:49 InnoDB: Started; log sequence number 6 4161791115
100316 10:58:49 [ERROR] Binlog has bad magic number; It's not a binary log file that can be used by this version of MySQL
100316 10:58:49 [ERROR] Can't init tc log
100316 10:58:49 [ERROR] Aborting
100316 10:58:49 InnoDB: Starting shutdown...
100316 10:58:54 InnoDB: Shutdown completed; log sequence number 6 4161791115
100316 10:58:54 [Note] /usr/sbin/mysqld: Shutdown complete
100316 10:58:54 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
100316 10:59:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100316 10:59:57 [Note] Plugin 'FEDERATED' is disabled.
100316 10:59:58 InnoDB: Started; log sequence number 6 4161791115
100316 10:59:58 [ERROR] Binlog has bad magic number; It's not a binary log file that can be used by this version of MySQL
100316 10:59:58 [ERROR] Can't init tc log
100316 10:59:58 [ERROR] Aborting
100316 10:59:58 InnoDB: Starting shutdown...
100316 11:00:03 InnoDB: Shutdown completed; log sequence number 6 4161791115
100316 11:00:03 [Note] /usr/sbin/mysqld: Shutdown complete
100316 11:00:03 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
=================解决方案=====================
今天启动数据报错,下面是错误日志,谁能帮忙看看,谢谢了
100316 10:58:47 mysqld_safe
Starting mysqld daemon with databases from /var/lib/mysql
100316 10:58:48 [Note] Plugin 'FEDERATED' is disabled.
100316 10:58:49 InnoDB: Started; log sequence number 6 4161791115
100316 10:58:49 [ERROR] Binlog has bad magic number; It's not a binary log file that can be used by this version of MySQL
100316 10:58:49 [ERROR] Can't init tc log
100316 10:58:49 [ERROR] Aborting
100316 10:58:49 InnoDB: Starting shutdown...
100316 10:58:54 InnoDB: Shutdown completed; log sequence number 6 4161791115
100316 10:58:54 [Note] /usr/sbin/mysqld: Shutdown complete
100316 10:58:54 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
100316 10:59:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100316 10:59:57 [Note] Plugin 'FEDERATED' is disabled.
100316 10:59:58 InnoDB: Started; log sequence number 6 4161791115
100316 10:59:58 [ERROR] Binlog has bad magic number; It's not a binary log file that can be used by this version of MySQL
100316 10:59:58 [ERROR] Can't init tc log
100316 10:59:58 [ERROR] Aborting
100316 10:59:58 InnoDB: Starting shutdown...
100316 11:00:03 InnoDB: Shutdown completed; log sequence number 6 4161791115
100316 11:00:03 [Note] /usr/sbin/mysqld: Shutdown complete
100316 11:00:03 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
=================解决方案=====================
问题解决了, 檢查後依然不能開始MySQL 服務器 …… 打開 /var/log/syslog 看看有沒有以下一行 Feb 26 20:45:59 Yubis-production /etc/init.d/mysql[6254]: ^G/usr/bin/mysqladmin: connect to server at ‘localhost’ failed Feb 26 20:45:59 Yubis-production /etc/init.d/mysql[6254]: error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ Feb 26 20:45:59 Yubis-production /etc/init.d/mysql[6254]: Check that mysqld is running and that the socket: ‘/var/run/mysqld/mysqld.sock’ exists! Feb 26 20:45:59 Yubis-production /etc/init.d/mysql[6254]: Feb 26 20:46:04 Yubis-production mysqld_safe[6319]: started Feb 26 20:46:04 Yubis-production mysqld[6328]: 090226 20:46:04 InnoDB: Started; log sequence number 0 43665 Feb 26 20:46:04 Yubis-production mysqld[6328]: 090226 20:46:04 [ERROR] Binlog has bad magic number; It’s not a binary log file that can be used by this version of MySQL 如果存在的話, 應該是你的 MySQL 服務器沒有正常關上, 那就 … 打開 /var/log/mysql keithyau@Yubis-production:/var/lib$ sudo ls -l /var/log/mysql/ total 295696 -rw-rw—- 1 mysql adm 104885450 2009-02-18 12:36 mysql-bin.000077 -rw-rw—- 1 mysql adm 105175310 2009-02-24 11:27 mysql-bin.000078 -rw-rw—- 1 mysql adm 83164522 2009-02-26 19:24 mysql-bin.000079 -rw-rw—- 1 mysql adm 98 2009-02-26 19:56 mysql-bin.000080 -rw-rw—- 1 mysql adm 9233377 2009-02-27 16:10 mysql-bin.000081 -rw-rw—- 1 mysql adm 160 2009-02-26 21:08 mysql-bin.index 把最後一個 bin 檔案刪除 sudo rm /var/log/mysql/mysql-bin.00081 再打開 mysql-bin.index 把最後一行刪除 sudo vi /var/log/mysql/mysql-bin.index /var/log/mysql/mysql-bin.000077 /var/log/mysql/mysql-bin.000078 /var/log/mysql/mysql-bin.000079 /var/log/mysql/mysql-bin.000080 /var/log/mysql/mysql-bin.000081 重新打開 MySQL 資料庫就完成了 Sudo /etc/init.d/mysql restart |
相关文章推荐
- mysql的1067错误之一
- MySQL自学笔记——数据库的建立
- 完整删除MySQL
- mysql性能优化-慢查询分析、优化索引和配置
- MySQL group_concat_max_len
- Mysql 配置文件my.cnf详解
- MySQL Server 5.0–安装及配置/MySQLInstanceConfig.exe用法详解
- 【未完】Gearman分布式处理,mysql队列详解
- MySql:操作表的语句以及常用的字段类型
- mysql优化之参数优化
- mysql 方法或者存储过程执行慢的调试方法
- mysql分组排序
- mysql表连接总结
- MySQL与SQLServer的update left join语法区别
- Mysql5.5中设置utf-8编码、大小写、root启动的问题
- MySQL left join快 inner join慢
- ubuntu mysql5.5安装备忘
- 转:中国省/市/县三级联动MySQL数据
- MySQL Front很讨厌的 Row XX doesn't contain data for all columns错误
- MySQL分表方法