[root@spark01 ~]# /etc/init.d/mysqld start建立/var/run/mysqld/目錄,重啟mysql服務starting mysqld (via systemctl): job for mysqld.service failed because the control process exited with error code. see "systemctl status mysqld.service" and "journalctl -xe" for details.
[failed]
[root@spark01 ~]# mkdir -p /var/run/mysqld/
[root@spark01 ~]# /etc/init.d/mysqld start
starting mysqld (via systemctl): job for mysqld.service failed because the control process exited with error code. see "systemctl status mysqld.service" and "journalctl -xe" for details.依舊報錯,重新檢視告警日誌,有以下輸出[failed]
2016-01-20t10:28:37.183387z 0 [error] /usr/sbin/mysqld: can't create/write to file '/var/run/mysqld/mysqld.pid' (errcode: 13 - permission denied)原來,/var/run/mysqld/的屬主和屬組還是root,mysql並不能在其中建立檔案,後修改該目錄的屬主和屬組,啟動ok。2016-01-20t10:28:37.183431z 0 [error] can't start server: can't create pid file: permission denied
160120 18:28:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160120 18:32:06 mysqld_safe starting mysqld daemon with databases from /var/lib/mysql
[root@spark01 ~]# ls -ld /var/run/mysqld/drwxr-xr-x 2 root root 40 jan 20 18:28 /var/run/mysqld/
[root@spark01 ~]# chown mysql.mysql /var/run/mysqld/
[root@spark01 ~]# /etc/init.d/mysqld start
starting mysqld (via systemctl): [ ok ]
Mysql安裝無法啟動問題
第一次在本機安裝mysql,安裝過程 現了啟動失敗的情況。這樣的情況解決方法重置服務密碼 密碼過期 進行解決 前提 1 安裝sql時,配置好環境變數 2 sql安裝包中的配置檔案 將 ini修改為my.ini 移動到bin目下 3 cmd進入sql安裝目錄下的bin目錄 輸入命令 mysqld in...
MySQL 服務無法啟動 問題處理
症狀 前一天在mysql中刪除了幾個不用的資料庫後登陸mysql出現以下錯誤 mysql u root p passwd error 2002 hy000 can t connect to local mysql server through socket var run mysqld mysqld...
MySQL 服務無法啟動 問題處理
症狀 前一天在mysql中刪除了幾個不用的資料庫後登陸mysql出現以下錯誤 mysql u root p passwd error 2002 hy000 can t connect to local mysql server through socket var run mysqld mysqld...