关于linux下mysql的一些错误解决
先看看mysql进程是否启动
ps -ef | grep mysqld
或者
/etc/rc.d/init.d/mysqld status 查看MySQL状态,看看是否运行。
没有运行的话就输入
/etc/rc.d/init.d/mysqld start 这时,就会初始化数据库了。
ERROR! MySQL is running but PID file could not be found
先打印MYSQL进程
ps aux | grep mysql
杀死进程 kill 进程数字 一定要一个个杀死
再启动MYSQL这一步可能失败,记得百度
/etc/rc.d/init.d/mysqld status start
再检查mysql运行状态
/etc/rc.d/init.d/mysqld status status