1.啟動命令
systemctl start mysqld.service 或者 /etc/init.d/mysqld start 結果同樣的錯誤
2.錯誤是:
job for mysqld.service failed. see 'systemctl status mysqld.service' and 'journalctl -xn' for details.
3.按照提示輸入命令
systemctl status mysqld.service 或者 journalctl -xn
mysqld.service - sysv: mysql database server.
loaded: loaded (/etc/rc.d/init.d/mysqld)
active: failed (result: exit-code) since tue 2017-03-14 09:00:45 cst; 9s ago
process: 2550 execstart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/failure)
starting sysv: mysql database server....
mysql daemon failed to start.
starting mysqld: [failed]
mysqld.service: control process exited, code=exited status=1
failed to start sysv: mysql database server..
unit mysqld.service entered failed state.
4.進一步檢視日誌:
vi /var/log/mysqld.log
如下:[error] /usr/sbin/mysqld: can't create/write to file '/var/run/mysqld/mysqld.pid' (errcode: 2 - no such file or directory)
[error] can't start server: can't create pid file: no such file or directory
5.建立該目錄
mkdir -p /var/run/mysqld/
6.啟動mysql服務
/etc/init.d/mysqld start
錯誤和原來一致
7.檢視日誌:
如下:[error] /usr/sbin/mysqld: can't create/write to file '/var/run/mysqld/mysqld.pid' (errcode: 13 - permission denied)
[error] can't start server: can't create pid file: permission denied
8.授權
chown mysql.mysql /var/run/mysqld/
9.啟動
MYSQL 啟動報錯
我先說一下我安裝mysql的操作吧 1 開始的時候,安裝mysql,是那種解壓縮就能用的軟體包。我把它解壓後,拷貝到 usr local 目錄下,並把名字命名為mysql。2 建立使用者mysql。root localhost useradd mysql 3 修改許可權。root localhost...
mysql啟動服務報錯解決方案
啟動mysql服務出現如下的錯誤資訊 mysql服務無法啟動 本地計算機無法啟動mysql服務。錯誤 1067 程序意外終止。解決方案 執行cd c program files mysql mysql server 5.1 bin c program files mysql mysql server...
MySQL 啟動服務報錯解決方案
概述 文章主要介紹因為啟動mysql服務報錯引發的問題,順帶擴充一些其它的知識點,當前版本是red hat 6,mysql 5.6。目錄 概述步驟報錯的源頭 問題解決 問題分析 系統自動重啟服務總結 步驟 報錯的源頭 問題解決 1.許可權 報錯的源頭就是它了,一般這種問題首先會想到的就是許可權問題,...