LNMP V0.7 MySQL 挂了
=========================================================================Manager for LNMP V0.7,Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!
php-fpm is stop!
/etc/init.d/mysql: line 419: test: 4054: binary operator expected
MySQL is running but PID file could not be found
我Linode重启后就出现这样的情况,现在只能root登陆。用到数据库的地方包括ftp都挂了。
有什么方法啊,或者能拿到数据库中的数据也行啊。
谢谢军哥。 ERROR! MySQL is running but PID file could not be found ?
出现这个问题原因很多
最常见的通常是PID进程未全部关闭
比如启动safe mysqld进程后
未关闭
运行 /etc/init.d/mysql status
会提示
ERROR! MySQL is running but PID file could not be found
先打印MYSQL进程
ps aux | grep mysql
然后KILL进程
kill -9 pid1 pid2 …
在启动MYSQL
/etc/init.d/mysql start
在检查
/etc/init.d/mysql status
SUCCESS! MySQL running (10021)
这个只是其中一个原因
还有其他的 大部分的错误可以在日志里查看到
Centos mysql的日志
在/var/lib/mysql/主机头名称xxx.err ySQL is running but PID file could not be found
表现为mysql不能关闭也不能重启
查看启动脚本/etc/init.d/msyql.server 可以发现:
由于pid默认为mysql/data/hostname.pid
若在mysql运行期间修改hostname,再操作mysql则会出现此错误.
如何解决:
查找mysql data下的pid文件,找到原hostname
修改回去关闭mysql,重新改hostname即可. 原帖由 puffbaby 于 2013-9-24 16:54 发表 https://bbs.vpser.net/images/common/back.gif
ERROR! MySQL is running but PID file could not be found ?
出现这个问题原因很多
最常见的通常是PID进程未全部关闭
比如启动safe mysqld进程后
未关闭
运行 /etc/init.d/mysql status
会提示
ERROR! MySQL is r ...
# ps aux | grep mysql
root 31030.00.2 46801216 ? S Sep23 0:00 /bin/sh /usr/lo cal/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/m ysql/var/li379-78.pid
mysql 32070.01.0341525152 ? S Sep23 0:00 /usr/local/mysq l/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --use r=mysql --log-error=/usr/local/mysql/var/li379-78.err --pid-file=/usr/local/mysq l/var/li379-78.pid --socket=/tmp/mysql.sock --port=3306
root 39510.00.2 46321136 ? S 15:16 0:00 /bin/sh /usr/lo cal/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/m ysql/var/li379-78.pid
mysql 40540.00.9341525020 ? S 15:16 0:00 /usr/local/mysq l/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --use r=mysql --log-error=/usr/local/mysql/var/li379-78.err --pid-file=/usr/local/mysq l/var/li379-78.pid --socket=/tmp/mysql.sock --port=3306
root 87060.00.1 4044 668 pts/0 S+ 17:24 0:00 grep mysql
然后我该怎么操作kill 3103
kill 3207
kill 3951
kill 4054
kill 8706
再运行运行 /etc/init.d/mysql status
也还是一样显示出来么
[ 本帖最后由 aedisju 于 2013-9-24 17:45 编辑 ] 置顶帖问题反馈有要求,提供mysql日志 原帖由 licess 于 2013-9-25 08:21 发表 https://bbs.vpser.net/images/common/back.gif
置顶帖问题反馈有要求,提供mysql日志 服务商:Linode
系统:CenterOS 5.6 32bit
版本:lnmp0.7
不是新装,已经运行了很长时间了,应该是0.7出来后至今吧。
mysql运行不正常的话,提供/usr/local/mysql/var/主机名.err 的日志。
已经传到附件。
PHP-FPM挂了,PHP 5.2 提供 /usr/local/php/logs/php-fpm.log的日志;PHP 5.3提供/usr/local/php/var/log/php-fpm.log 的日志。
找到
/usr/local/php/logs/php-fpm.log的日志,但是里面没任何内容。 /usr/local/mysql/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs
130924 17:33:31 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
/usr/local/mysql/libexec/mysqld: Disk is full writing './mysql-bin.~rec~' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
当前分区或磁盘已满 原帖由 licess 于 2013-9-25 19:56 发表 https://bbs.vpser.net/images/common/back.gif
/usr/local/mysql/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs
130924 17:33:31 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
/usr/local/mysql/libexec/my ... 自己的几个小网站不太会增加文件大小,lnmp的日志增加的大么?如果大,怎么删除。准备先可以用,导出sql,然后装个lnmp1.0啦 https://bbs.vpser.net/thread-8393-1-1.html 原帖由 licess 于 2013-9-26 15:30 发表 https://bbs.vpser.net/images/common/back.gif
https://bbs.vpser.net/thread-8393-1-1.html
解决了,果然是硬盘满了,删除了日志。谢谢
页:
[1]