1 Overview
Reference: https://www.jianshu.com/p/6d74635e068b
Since I haven't used MySql for a long time, I want to start it today and found that it can't be started. I entered the MySql start command and reported an error.
The steps are as follows:
enter the MySql startup command:
sudo /usr/local/mysql/support-files/mysql.server start
The error message is as follows:
Starting MySQL
.Logging to '/usr/local/mysql/data/mac.local.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/mac.local.pid).
Later, I found the reason and found that /usr/local/mysql/data/
the mysql owner permissions of the directory have changed, and there is no write permission, so you need to grant write permissions to the directory. The operation commands are as follows:
sudo chown -R mysql /usr/local/mysql/data
Then enter the start command again:
sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
.Logging to '/usr/local/mysql/data/oxy-mac.local.err'.
. SUCCESS!
It's a success!