VPS侦探论坛

 找回密码
 注册
查看: 3320|回复: 1

LNMP的mysql不能启动了报两个错误

[复制链接]
发表于 2016-8-11 23:23:28 | 显示全部楼层 |阅读模式

1.直接在vps输入mysql会提示错误ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

2.通过/etc/init.d/mysql start启动提示下面的错误
. * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

因为最近学着打站,所以用的是军哥的lnmp一键包
然后第一玩vps,安装好的时候都是一切OK然后在vps的后台更改过一次hostname(原始的是JovialDirect-VM,更改为了自己的名字),然后貌似数据库就出错了。


下面是错误日志,军哥能帮忙看看什么问题吗?google搜了上面的两个错误,所有的方法都试过了。都没有用。不知道如何解决了。
160810 14:08:47 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
160810 14:08:47 [Note] Plugin 'InnoDB' is disabled.
160810 14:08:47 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160810 14:08:47 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160810 14:08:47 [Note] Server socket created on IP: '0.0.0.0'.
160810 14:08:47 [Note] Event Scheduler: Loaded 0 events
160810 14:08:47 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.42-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160810 14:08:47 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

160810 14:08:47 [Note] Event Scheduler: Purging the queue. 0 events
160810 14:08:47 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

160810 14:08:47 mysqld_safe mysqld from pid file /usr/local/mysql/var/JovialDirect-VM.pid ended
160810 14:08:49 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
160810 14:08:49 [Note] Plugin 'InnoDB' is disabled.
160810 14:08:49 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160810 14:08:49 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160810 14:08:49 [Note] Server socket created on IP: '0.0.0.0'.
160810 14:08:49 [Note] Event Scheduler: Loaded 0 events
160810 14:08:49 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.42-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160810 14:08:49 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

160810 14:08:49 [Note] Event Scheduler: Purging the queue. 0 events
160810 14:08:49 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

160810 14:08:49 mysqld_safe mysqld from pid file /usr/local/mysql/var/JovialDirect-VM.pid ended
160810 14:22:43 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
160810 14:22:43 [Note] Plugin 'InnoDB' is disabled.
160810 14:22:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160810 14:22:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160810 14:22:43 [Note] Server socket created on IP: '0.0.0.0'.
160810 14:22:43 [Note] Event Scheduler: Loaded 0 events
160810 14:22:43 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.42-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160811  2:49:12 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

160811  2:49:12 [Note] Event Scheduler: Purging the queue. 0 events
160811  2:49:12 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

160811 02:49:12 mysqld_safe mysqld from pid file /usr/local/mysql/var/JovialDirect-VM.pid ended

[ 本帖最后由 lovelykid 于 2016-8-11 23:30 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-8-12 08:21:35 | 显示全部楼层


可能有通过其他方式安装的mysql干扰造成的

centos的话:rpm -qa|grep mysql
debian/ubuntu的话:dpkg -l|grep mysql 看一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-17 04:58 , Processed in 0.033343 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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