VPS侦探论坛

 找回密码
 注册
查看: 3777|回复: 4

求助!!我的 MySQL 启动不了!!!

[复制链接]
发表于 2017-2-23 17:35:17 | 显示全部楼层 |阅读模式

我在用 LNMP1.4安装时,安装一切正常,但是,MySQL 无法启动,应该怎么解决呢,

请大神帮我。。


mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-02-23 17:26:07 CST; 634ms ago
     Docs: man:systemd-sysv-generator(8)

Feb 23 17:26:05 ip-172-31-24-76 systemd[1]: Starting LSB: start and stop MySQL...
Feb 23 17:26:05 ip-172-31-24-76 mysql[22216]: Starting MySQL
Feb 23 17:26:07 ip-172-31-24-76 mysql[22216]: .. * The server quit without updating PID file (/usr/local/mysql/var/ip-172-31-24--11.pid).
Feb 23 17:26:07 ip-172-31-24-76 systemd[1]: mysql.service: Control process exited, code=exited status=1
Feb 23 17:26:07 ip-172-31-24-76 systemd[1]: Failed to start LSB: start and stop MySQL.
Feb 23 17:26:07 ip-172-31-24-76 systemd[1]: mysql.service: Unit entered failed state.
Feb 23 17:26:07 ip-172-31-24-76 systemd[1]: mysql.service: Failed with result 'exit-code'.
Active Internet connections (only servers)
输入:mysql -u root -p
root@ip-172-31-24-11:/home/ubuntu/lnmp1.4# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-2-23 19:03:14 | 显示全部楼层


仔细阅读置顶帖反馈必读
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-2-27 12:09:52 | 显示全部楼层

错误日志是一下内容。

170227 11:54:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
170227 11:54:03 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
170227 11:54:03 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.53-log) starting as process 8841 ...
170227 11:54:03 [Note] Plugin 'FEDERATED' is disabled.
170227 11:54:03 InnoDB: The InnoDB memory heap is disabled
170227 11:54:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170227 11:54:03 InnoDB: Compressed tables use zlib 1.2.8
170227 11:54:03 InnoDB: Initializing buffer pool, size = 16.0M
170227 11:54:03 InnoDB: Completed initialization of buffer pool
170227 11:54:03 InnoDB: highest supported file format is Barracuda.
170227 11:54:03  InnoDB: Waiting for the background threads to start
170227 11:54:04 InnoDB: 5.5.53 started; log sequence number 1595675
170227 11:54:04 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170227 11:54:04 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
170227 11:54:04 [Note] Server socket created on IP: '0.0.0.0'.
170227 11:54:04 [ERROR] Can't start server : Bind on unix socket: Address already in use
170227 11:54:04 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
170227 11:54:04 [ERROR] Aborting

170227 11:54:04  InnoDB: Starting shutdown...
170227 11:54:04  InnoDB: Shutdown completed; log sequence number 1595675
170227 11:54:04 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

170227 11:54:04 mysqld_safe mysqld from pid file /usr/local/mysql/var/ip-172-31-24-76.pid ended
170227 11:55:50 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
170227 11:55:50 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-2-27 12:59:10 | 显示全部楼层



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-2-27 13:17:36 | 显示全部楼层

170227 11:54:04 [ERROR] Can't start server : Bind on unix socket: Address already in use
170227 11:54:04 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
170227 11:54:04 [ERROR] Aborting

按提示已经有mysql在运行或占用了端口
可以ps aux看一下进程 netstat -ntl 看一下端口
可以尝试 killall mysqld
再重启试试

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

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-27 19:20 , Processed in 0.026749 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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