Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1836358
  • 博文数量: 293
  • 博客积分: 10127
  • 博客等级: 上将
  • 技术积分: 3029
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-12 19:05
文章分类

全部博文(293)

文章存档

2011年(11)

2010年(282)

我的朋友

分类: Mysql/postgreSQL

2010-09-06 12:56:51

今天发现服务器上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!

启动成功!

 

如果不行,还可以有一种解决办法。那就是关闭二进制日志功能。

方法:

使用vi编辑器打开/etc/my.cnf文件,找到log-bin=mysql-bin将其加上注释即可。修改后为:#log-bin=mysql-bin;

启动mysql即可!这是一种迫不得已的办法

 

阅读(9013) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-07 11:20:47

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com