MySQL is running but PID file is not found
来源:互联网 发布:字符串转json android 编辑:程序博客网 时间:2024/04/29 09:16
今天vps访问速度很慢,我用/root/lnmp restart 命令给lnmp重启了一下,重启之后发觉mysql链接不上了。 ssh里面运行 service mysql restrat 出现 MySQL is running but PID file could not be found 错误。
用mysql -u root -p 命令运行mysql时出现 Can't connect to MySQL through socket mysql.sock 错误。
后来网上找到一篇不错的文章 mysql PID file not found and Can't connect to MySQL through socket mysql.sock虽然后来我是直接重启vps(reboot)解决这个问题,不过上面文章里的很多内容还是挺有用的。
记录几个以前不知道的知识:
1、grep 是查找命令 可做文件内的字符串查找,使用如: ps aux | grep mysql
2、ps 命令 显示所有进程 跟windows系统的 tasklist 命令相似 aux 显示所有包含其他使用者的行程 比如我运行 ps aux | grep mysql 命令后能够找到
–datadir=/usr/local/mysql/var–pid-file=/usr/local/mysql/var/li220-124.pid
3、kill -9 [PID] 终止进程命令 通过ps 找到进程pid 然后用kill -9 [PID]终止进程(-9表示强迫进程立即停止)
4、hostname 命令显示当前主机名 uname -a 命令显示当前系统内核版本
5、service命令
通过 service mysql status 可以查看 mysql的状态。但是其他服务名称如何查找?
发现通过 ls /etc/init.d/ 目录下面可以找到各个服务名称。
6、top命令 查看内存和cup使用情况
< shift+m 按内存使用排序>
<1 显示cpu使用情况>
7、chown 更改属主和属主组
chown [OPTION]… [OWNER][:[GROUP]] FILE…
如:chown mysql:mysql redhat.pid 更改redhat.pid 的ownner为mysql 所属组为mysql
- MySQL is running but PID file is not found
- linux无法启动mySQL解决办法,MySQL is running but PID file could not be found
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?
- mysql无法启动ERROR! MySQL is running but PID file could not be found
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?
- ERROR! MySQL is running but PID file could not be found ?
- MySQL is running but PID file could not be found [FAILED]
- MySQL is running but PID file could not be found[失败]
- MySQL is running but PID file could not be found(解决方法)
- 将MySQL数据库搬迁到另一服务器中遇到的问题:MySQL is running but PID file could not be found[FAILED]&MySQL大小写
- mysql无法启动ERROR! MySQL is running but PID file coul
- centOS下msyql启动错误-Multiple MySQL running but PID file could not be found
- 解决Multiple MySQL running but PID file could not be found (179[失败])
- Linux 下mysql 启动失败 Multiple MySQL running but PID file could not be found (1761 1448)[失败]
- Linux虚拟机的Mysql启动失败 ERROR! Multiple MySQL running but PID file could not be found (
- Select 查询优化
- 学习Seam
- 嵌入式资源网站
- linux下MYSQL的启动与访问
- 雪峰网十周年庆
- MySQL is running but PID file is not found
- hdu 5.2.6 3231 box relations
- drbd中文应用指南
- mysql导入文本或excel文件
- ARM汇编学习经验谈
- mysql PID file not found and Can't connect to MySQL through socket mysql.sock
- 神奇的vfork
- Oracle主键自增
- Oracle数据类型