在bash執行
"systemctl start mysqld"
提示:
“Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.”
/var/lib/mysql權限問題。cd目錄,執行以下,解決:
bash-4.2# setenforce 0 bash-4.2# chown -R mysql:mysql /var/lib/mysql bash-4.2# chmod -R 777 /var/lib/mysql bash-4.2# systemctl start mysqld.service bash-4.2# ps -ef |grep mysql
再執行:
systemctl start mysqld.service
運行啦
mysql 3476 1 0 09:49 ? 00:00:00 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid root 4190 32434 0 10:01 pts/0 00:00:00 grep --color=auto mysqld