service mysql start 报错总结
在linux上安装mysql后 启动mysql,或者在使用mysql过程中启动mysql 可能出现以下错:
常见错误以下三种,可循环解决! 让报错无所遁形!!!
报错一:
ERROR! MySQL is running but PID file could not be found
1.先打印MYSQL进程
ps aux | grep mysql
2.然后Kill进程
kill -9 pid1 pid2 …
3.再启动MYSQL
/etc/init.d/mysql start
4.再检查mysql运行状态
/etc/init.d/mysql status
报错二:
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/hadoop01.pid).
1 . ps -ef | grep mysql
kill -9 PID
2 . ls -laF /usr/local/var/mysql/
前两步如果不奏效,请直接执行更改当前用户权限:
sudo chown -R hadoop.hadoop /var/lib/mysql
3.再启动MYSQL
/etc/init.d/mysql start
4.再检查mysql运行状态
/etc/init.d/mysql status
报错三:
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
之后保存再重启还是出错。
最后检查可能和log文件有关,于是将log文件给移除了,再重启MySQL终于OK了。
1./etc/init.d/mysql status
coming back with:
mysql is not running but lock exists
Solved by removing the lock file:
2.rm /var/lock/subsys/mysql
If this happens again it may also be necessary to remove the pid file from /var/lib/mysql
原文链接:https://blog.csdn.net/young_0609/article/details/78062050
推荐阅读
-
线上MYSQL同步报错故障处理方法总结(必看篇)
-
关于xampp中无法启动mysql,Attempting to start MySQL service...的解决办法!!
-
线上MYSQL同步报错故障处理方法总结(必看篇)
-
Centos7 执行firewall-cmd –permanent –add-service=mysql报错“ModuleNotFoundError: No module named 'gi'”
-
启动docker服务的时候报错:Failed to start docker.service: Unit docker.service is masked.
-
service docker start 报错 :Failed to start docker.se
-
service mysql start 报错总结
-
service docker start 报错
-
The nexus service was launched, but failed to start. --nexus启动报错完美解决
-
Mysql“service mysqld start”无法启动