看到一条数据库告警:check_mysql_slave NPRE:Command timed out after 60 seconds
check_mysql_slave
登入数据库系统查看数据库状态显示:MySQL is running but PID file could not be found
service mysql status
结果:MySQL is running but PID file could not be found
可能性原因:(我这里显然是第一种磁盘空间满)
1.硬盘满
解决方案:清理磁盘
du -h --max-depth=1
查看各目录磁盘占用情况\
du -h --max=depth=1 |grep [TG] |sort
#查找上G和T的目录并排序
2.修改my.cnf配置出错导致.
解决方案:修改my.cnf配置文件
参考:https://blog.csdn.net/wuzhilon88/article/details/17616635
3.other
查看下数据库运行状态
/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
再检查mysql运行状态
/etc/init.d/mysql status
提示成功