Starting MySQL.The server quit without updating PID file

raysuen發表於2017-05-31
今天下載了一個mysql5.7.18原始碼,裝著玩,沒想到安裝了一上午都沒有完成,不停報錯,最後發現竟然是錯誤日誌許可權導致的。真是魔鬼藏在細節中啊。重要的事情說三遍:注意細節,注意細節,注意細節!!
[root@mysql5-7-18 ~]# chown root:root /usr/local/mysql/log/mysql_mysql-5-7-18.err
[root@mysql5-7-18 ~]# ll /usr/local/mysql/log/      
total 40
-rwxr-xr-x. 1 root  root  9357 May 31 14:13 mysql_mysql-5-7-18.err
-rwxr-xr-x. 1 mysql mysql  177 May 31 11:33 ray-bin.000001
-rwxr-xr-x  1 mysql mysql  177 May 31 14:05 ray-bin.000002
-rwxr-xr-x  1 mysql mysql  177 May 31 14:07 ray-bin.000003
-rwxr-xr-x  1 mysql mysql  177 May 31 14:09 ray-bin.000004
-rwxr-xr-x  1 mysql mysql  573 May 31 14:13 ray-bin.000005
-rwxr-xr-x  1 mysql mysql  180 May 31 14:09 ray-bin.index
-rwxr-xr-x. 1 mysql mysql  925 May 31 14:09 slow-log.log
[root@mysql5-7-18 docs]# service mysqld start
Starting MySQL.The server quit without updating PID file (/[FAILED]l/mysql/data/mysql5-7-18.pid).
[root@mysql5-7-18 ~]# chown mysql:mysql /usr/local/mysql/log/mysql_mysql-5-7-18.err    
[root@mysql5-7-18 ~]# ll /usr/local/mysql/log/                                     
total 40
-rwxr-xr-x. 1 mysql mysql 9357 May 31 14:13 mysql_mysql-5-7-18.err
-rwxr-xr-x. 1 mysql mysql  177 May 31 11:33 ray-bin.000001
-rwxr-xr-x  1 mysql mysql  177 May 31 14:05 ray-bin.000002
-rwxr-xr-x  1 mysql mysql  177 May 31 14:07 ray-bin.000003
-rwxr-xr-x  1 mysql mysql  177 May 31 14:09 ray-bin.000004
-rwxr-xr-x  1 mysql mysql  573 May 31 14:13 ray-bin.000005
-rwxr-xr-x  1 mysql mysql  180 May 31 14:09 ray-bin.index
-rwxr-xr-x. 1 mysql mysql  925 May 31 14:09 slow-log.log
[root@mysql5-7-18 ~]# service mysqld start
Starting MySQL..                                           [  OK  ]
[root@mysql5-7-18 ~]# 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2140091/,如需轉載,請註明出處,否則將追究法律責任。

相關文章