lnmp解决mysql The server quit without updating PID file
lnmp安装包,挂个小网站,mysql跑了几年,一直没去动它。后来有时mysql 挂掉了,偷懒写个自动重启脚本,又继续安稳几个月时间。今天突然发现mysql挂了,重启了报“The server quit without updating PID file”。按网上方法试了还是没解决,后来看到有点说磁盘满了,“df -l”一查看,果真满了,请了日志后果然能重启mysql正常了。
后来又遇到这个问题,磁盘没满。看到错误日志有
“Plugin ‘FEDERATED’ is disabled”
在my.cnf文件中的 [mysqld] 中增加一行
tmpdir=”/usr/local/mysql/var”
同时增加权限 chown mysql:mysql /usr/local/mysql/var
运行service mysql start还是出错,查看错误日志看到
InnoDB: Database page corruption on disk or a failed
添加下面内容:
innodb_force_recovery=1
再启动mysql
则可以正常启动。