1. 程式人生 > >mysql啟動報錯 The server quit without updating PID file (/[FAILED]ql/cc.pid).

mysql啟動報錯 The server quit without updating PID file (/[FAILED]ql/cc.pid).

環境centos6.5  mysql版本是5.5.10

開啟mysql服務

/etc/init.d/mysqld start

報錯如下:Starting MySQL.The server quit without updating PID file (/[FAILED]ql/cc.pid).

我的錯誤日誌是/data/mysql/cc.err:

160418 09:33:10 mysqld_safe Starting mysqld daemon with databases from /data/mysql
160418  9:33:10 InnoDB: The InnoDB memory heap is disabled
160418  9:33:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160418  9:33:10 InnoDB: Compressed tables use zlib 1.2.3
/usr/local/mysql/bin/mysqld: Can't create/write to file '/tmp/iblXxbUK' (Errcode: 13)
160418  9:33:10  InnoDB: Error: unable to create temporary file; errno: 13
160418  9:33:10 [ERROR] Plugin 'InnoDB' init function returned error.
160418  9:33:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160418  9:33:10 [ERROR] Unknown/unsupported storage engine: InnoDB
160418  9:33:10 [ERROR] Aborting

160418  9:33:10 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

160418 09:33:10 mysqld_safe mysqld from pid file /data/mysql/cc.pid ended

我注意到了這個情況:/tmp這個臨時檔案目錄下不能寫檔案看來是許可權配置錯誤了

/usr/local/mysql/bin/mysqld: Can't create/write to file '/tmp/iblXxbUK' (Errcode: 13)

果然錯誤了:

[root@cc /]# ls -ld  /tmp
drwxrwxr-x. 4 root root 4096 Apr 18 09:37 /tmp

修改:[root@cc /]# chmod  1777  /tmp

重新啟動mysql:[root@cc /]# /etc/init.d/mysqld start
Starting MySQL..                                           [  OK  ]