环境说明
Centos6.5
MysqL 5.5.37
问题描述
[root@LNMP ~]# /etc/init.d/MysqL start Starting MysqL. ERROR! The server quit without updating PID file (/usr/local/MysqL/var/LNMP.pid).
查看错误日志
root@LNMP var]# tail -f /usr/local/MysqL/var/LNMP.err /usr/local/MysqL/bin/MysqLd: Can't create/write to file '/tmp/ibJb9vcs' (Errcode: 13) 161201 8:45:41 InnoDB: Error: unable to create temporary file; errno: 13 161201 8:45:41 [ERROR] Plugin 'InnoDB' init function returned error. 161201 8:45:41 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE Failed. 161201 8:45:41 [ERROR] Unknown/unsupported storage engine: InnoDB 161201 8:45:41 [ERROR] Aborting 161201 8:45:41 [Note] /usr/local/MysqL/bin/MysqLd: Shutdown complete 161201 08:45:41 MysqLd_safe MysqLd from pid file /usr/local/MysqL/var/LNMP.pid ended
解决办法
给临时文件加777权限
[root@LNMP var]# /etc/init.d/MysqL restart ERROR! MysqL server PID file could not be found! Starting MysqL.. SUCCESS! [root@LNMP var]# ps -ef | grep MysqL root 5305 1 0 08:49 pts/0 00:00:00 /bin/sh /usr/local/MysqL/bin/MysqLd_safe --datadir=/usr/local/MysqL/var --pid-file=/usr/local/MysqL/var/LNMP.pid MysqL 5690 5305 1 08:49 pts/0 00:00:00 /usr/local/MysqL/bin/MysqLd --basedir=/usr/local/MysqL --datadir=/usr/local/MysqL/var --plugin-dir=/usr/local/MysqL/lib/plugin --user=MysqL --log-error=/usr/local/MysqL/var/LNMP.err --pid-file=/usr/local/MysqL/var/LNMP.pid --socket=/tmp/MysqL.sock --port=3306 root 5712 1969 0 08:49 pts/0 00:00:00 grep MysqL