VPS侦探论坛

 找回密码
 注册
查看: 5862|回复: 7

MySQL 无法启动,在哪里看日志呢?

[复制链接]
发表于 2015-12-20 08:34:26 | 显示全部楼层 |阅读模式

提示:The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
查看了硬盘空间,确定没有满

尝试查看了/usr/local/mysql/var/localhost.pid 不存在 (原先用的,Stop之后就没有了)
尝试查看了 /usr/local/mysql/var/localhost.err 没有什么特别的错误

最后的提示是

151220  8:22:49 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

151220  8:22:49 [Note] Event Scheduler: Purging the queue. 0 events
151220  8:22:49  InnoDB: Starting shutdown...
151220  8:22:50  InnoDB: Shutdown completed; log sequence number 8326197738
151220  8:22:50 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

151220 08:22:50 mysqld_safe mysqld from pid file /usr/local/mysql/var/localhost.pid ended


是我stop mysql的提示

查看了权限 /usr/local/mysql/var 是 mysql:mysql 权限,其他的是 root:mysql权限,然后/var/run/mysql 是 root:mysql权限 (所有权限都是原来安装时候弄好的,从来没改过,以前都好好的,什么都没改过)

所以现在怎么排除错误呢??
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-12-20 09:45:48 | 显示全部楼层


置顶帖反馈必读有具体说明
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-12-20 09:49:07 | 显示全部楼层

原帖由 licess 于 2015-12-20 09:45 发表
置顶帖反馈必读有具体说明

感谢军哥回复那么块,我看了说明,但是在.err 那个文件中什么有用信息都没有,我在原帖中贴出的就是最新的信息,不管我怎么用 sudo lnmp mysql start 启动,怎么提示 PID的问题,都无法在.err中记录任何信息。

求解为什么?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-12-20 09:55:12 | 显示全部楼层



151215 12:27:00 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:01 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:01 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:01 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:02 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:02 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:03 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 12:27:03 [Warning] IP address '45.34.34.179' could not be resolved: Temporary failure in name resolution
151215 19:16:49 [Warning] IP address '180.97.215.2' could not be resolved: Name or service not known
151215 19:16:49 [Warning] IP address '180.97.215.2' could not be resolved: Name or service not known
151217  0:56:40 [Warning] IP address '103.241.51.11' could not be resolved: Name or service not known
151217 11:39:20 [Warning] IP address '183.60.227.9' could not be resolved: Name or service not known
151217 16:24:37 [Warning] IP address '124.232.150.230' could not be resolved: Name or service not known
151217 20:59:20 [Warning] IP address '27.255.67.132' could not be resolved: Name or service not known
151218  1:38:32 [Warning] IP address '182.254.149.138' could not be resolved: Name or service not known
151218  4:04:23 [Warning] IP address '185.35.62.11' could not be resolved: Name or service not known
151218  8:36:16 [Warning] IP address '150.242.249.86' could not be resolved: Name or service not known
151218 11:18:37 [Warning] IP address '222.186.134.55' could not be resolved: Name or service not known
151219 21:53:59 [Warning] IP address '222.186.31.151' could not be resolved: Name or service not known
151219 22:43:10 [Warning] IP address '222.186.30.247' could not be resolved: Name or service not known
151220  4:53:53 [Warning] IP address '222.186.51.141' could not be resolved: Name or service not known
151220  8:22:49 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

151220  8:22:49 [Note] Event Scheduler: Purging the queue. 0 events
151220  8:22:49  InnoDB: Starting shutdown...
151220  8:22:50  InnoDB: Shutdown completed; log sequence number 8326197738
151220  8:22:50 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

151220 08:22:50 mysqld_safe mysqld from pid file /usr/local/mysql/var/localhost.com.pid ended
[15-12-20 9:53] ➜ SharkIng@localhost.com  /usr/local/mysql/var  >cat localhost.com.err

这里就是从15号至今(刚刚看得)的.err里面的文件,现在mysql处于没有run的状态,运行 lnmp mysql start 提示

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting MySQL
. * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

mysql无法正常启动
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-12-20 12:25:21 | 显示全部楼层

已解决,谢谢了

似乎是my.cnf上面的问题

先后顺序不知道为什么成了 /etc/mysql/my.cnf先 /etc/my.cnf后,所以改了 /etc/my.cnf后么有反映,cp到/etc/mysql/my.cnf之后就好了

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-12-20 12:26:59 | 显示全部楼层

有/var/run/mysql 这个目录就有点不正常了,检查一下是否有yum或apt-get安装的mysql 进行干扰
 楼主| 发表于 2015-12-21 05:14:45 | 显示全部楼层

原帖由 licess 于 2015-12-20 12:26 发表
有/var/run/mysql 这个目录就有点不正常了,检查一下是否有yum或apt-get安装的mysql 进行干扰

前两天通过apt-get upgrade了一下所有安装程序后出现的问题,可能有关,修改/etc/mysql/my.cnf 之后就好了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-12-21 09:43:48 | 显示全部楼层

回复 7# 的帖子


有/etc/mysql/my.cnf 这个文件肯定是ap-get 安装上了另外的mysql
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 14:21 , Processed in 0.028197 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表