1 About the system:
System MacOS bigsur 11.6
MySQL 8.0.26
2. Start MySQL service:
sudo /usr/local/mysql/support-files/mysql. server start
MAC MYSQL Start Error Message:
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/jinjideleishen.local.pid).
Commands to solve MAC MYSQL Start Error :
In SQL the default user of MySQL is MySQL want chown the owner of the specified file to the specified user or group to change it, but in mac the default user is MySQL
-R: Process all files in the specified directory and its subdirectories
sudo chown -R _mysql:_mysql /usr/local/mysql/
Restart it:
sudo /usr/local/mysql/support-files/mysql.server restart
ERROR! MySQL server PID file could not be found!
Starting MySQL
.................................................... SUCCESS!
3. Stop MySQL service
sudo /usr/local/mysql/support-files/mysql.server stop
4. Restart MySQL service
sudo /usr/local/mysql/support-files/mysql.server restart