求助!!我的 MySQL 启动不了!!!
我在用 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: Starting LSB: start and stop MySQL...
Feb 23 17:26:05 ip-172-31-24-76 mysql: Starting MySQL
Feb 23 17:26:07 ip-172-31-24-76 mysql: .. * 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: mysql.service: Control process exited, code=exited status=1
Feb 23 17:26:07 ip-172-31-24-76 systemd: Failed to start LSB: start and stop MySQL.
Feb 23 17:26:07 ip-172-31-24-76 systemd: mysql.service: Unit entered failed state.
Feb 23 17:26:07 ip-172-31-24-76 systemd: 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) 仔细阅读置顶帖反馈必读 错误日志是一下内容。
170227 11:54:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
170227 11:54:03 --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
170227 11:54:03 /usr/local/mysql/bin/mysqld (mysqld 5.5.53-log) starting as process 8841 ...
170227 11:54:03 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:03InnoDB: Waiting for the background threads to start
170227 11:54:04 InnoDB: 5.5.53 started; log sequence number 1595675
170227 11:54:04 Server hostname (bind-address): '0.0.0.0'; port: 3306
170227 11:54:04 - '0.0.0.0' resolves to '0.0.0.0';
170227 11:54:04 Server socket created on IP: '0.0.0.0'.
170227 11:54:04 Can't start server : Bind on unix socket: Address already in use
170227 11:54:04 Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
170227 11:54:04 Aborting
170227 11:54:04InnoDB: Starting shutdown...
170227 11:54:04InnoDB: Shutdown completed; log sequence number 1595675
170227 11:54:04 /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 --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 170227 11:54:04 Can't start server : Bind on unix socket: Address already in use
170227 11:54:04 Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
170227 11:54:04 Aborting
按提示已经有mysql在运行或占用了端口
可以ps aux看一下进程 netstat -ntl 看一下端口
可以尝试 killall mysqld
再重启试试
页:
[1]