首页 > 网站相关 > 排除mysql启动时的错误

排除mysql启动时的错误

2010年8月26日 228,376 浏览数

今天发现服务器上MYSQL不知什么原因停止运行了,立马登陆后重新启动看看,输入如下命令:

#/usr/local/mysql/share/mysql/mysql.server status
先看一下运行状态,显示为:
ERROR! MySQL is not running, but lock exists

#/usr/local/mysql/share/mysql/mysql.server start
启动mysql,显示:
Starting MySQL…… ERROR! Manager of pid-file quit without updating file.

出现错误,启动失败!

去“/usr/local/mysql/var/”下查看错误日志:

100826 10:44:02 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
100826 10:44:02 [Warning] ‘–skip-locking’ is deprecated and will be removed in a future release. Please use ‘–skip-external-locking’ instead.
100826 10:44:02 [Note] Plugin ‘FEDERATED’ is disabled.
100826 10:44:02 [Note] Plugin ‘ndbcluster’ is disabled.
100826 10:44:02 InnoDB: Started; log sequence number 0 44233
/usr/local/mysql/libexec/mysqld: File ‘./mysql-bin.000003’ not found (Errcode: 13)
100826 10:44:02 [ERROR] Failed to open log (file ‘./mysql-bin.000003’, errno 13)
100826 10:44:02 [ERROR] Could not open log file
100826 10:44:02 [ERROR] Can’t init tc log
100826 10:44:02 [ERROR] Aborting

100826 10:44:02 InnoDB: Starting shutdown…
100826 10:44:07 InnoDB: Shutdown completed; log sequence number 0 44233
100826 10:44:07 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

100826 10:44:07 mysqld_safe mysqld from pid file /usr/local/mysql/var/figweb.pid ended

错误提示“Failed to open log (file ‘./mysql-bin.000003’, errno 13)” 不能打开日志文件“mysql-bin.000003”估计是权限问题

输入命令授于权限:
#chmod -r 755 /usr/local/mysql/var/mysql-bin.000003

重新启动mysql
#/usr/local/mysql/share/mysql/mysql.server start
Starting MySQL. SUCCESS!

启动成功!

分类: 网站相关 标签:
本文的评论功能被关闭了.