今天mysql数据库启动不了,查看错误日志如下:
/usr/sbin/mysqld: File './mysql-bin.000003' not found (Errcode: 2)
140319 10:49:22 [ERROR] Failed to open log (file './mysql-bin.000003', errno 2)
140319 10:49:22 [ERROR] Could not open log file
140319 10:49:22 [ERROR] Can't init tc log
140319 10:49:22 [ERROR] Aborting
140319 10:49:22 InnoDB: Starting shutdown...
140319 10:49:27 InnoDB: Shutdown completed; log sequence number 0 2154633517
140319 10:49:27 [Note] /usr/sbin/mysqld: Shutdown complete
140319 10:49:27 mysqld_safe mysqld from pid file /var/lib/mysql/richinfo-dev2.pid ended
140319 10:59:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140319 10:59:48 [Note] Plugin 'FEDERATED' is disabled.
140319 10:59:48 InnoDB: Initializing buffer pool, size = 256.0M
140319 10:59:48 InnoDB: Completed initialization of buffer pool
140319 10:59:48 InnoDB: Started; log sequence number 0 2154633517
/usr/sbin/mysqld: File './mysql-bin.000003' not found (Errcode: 2)
140319 10:59:48 [ERROR] Failed to open log (file './mysql-bin.000003', errno 2)
140319 10:59:48 [ERROR] Could not open log file
140319 10:59:48 [ERROR] Can't init tc log
140319 10:59:48 [ERROR] Aborting
140319 10:59:48 InnoDB: Starting shutdown...
140319 10:59:54 InnoDB: Shutdown completed; log sequence number 0 2154633517
140319 10:59:54 [Note] /usr/sbin/mysqld: Shutdown complete
140319 10:59:54 mysqld_safe mysqld from pid file /var/lib/mysql/richinfo-dev2.pid ended
发现这里找不到日志文件/mysql-bin.000003,在操作系统查看该文件确实不存在,继续查看mysql启动参数文件/etc/my.cnf
#log-bin=mysql-bin
发现数据库是禁用了日志功能的,估计是mysql-bin.index文件没有删除导致的,在操作系统上查看该文件确实存在,将其删除后,再次启动数据库,数据库能正常启动.
-- The End --
阅读(5965) | 评论(0) | 转发(0) |