Error upon HighSierra x mysql.sock.lock
The errors I met were below.
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock'(#2), (38)
OSError: [Errno 13] Permission denied.
The server quit without updating PID file (/usr/local/var/mysql/xxxx.local.pid).
#2002 Failure to login MySQL server.
Finally, I couldn’t access localhost or failed to connect to Wi-Fi.
(Maybe this has nothing to do with the server error)
It seemed the mysql.sock file was not working.
First, I installed the latest version of MySQL(ver 8.1), but it didn’t work.
Then I uninstalled MYSQL and installed ver 5.7, but it didn’t work…
I tried the method that google suggested, but none of them solved my error.
At that time, MYSQL couldn’t be controlled through system preferences.
When installed ver 8.1, the status turns to start and stop in a few seconds.
Then I checked the folder including .sock file, mysql.sock.lock was deleted and appeared every few seconds.
This .sock file was added after ver 5.7.
So I installed ver 5.6 which doesn’t have .sock file, and then everything went smoothly.
Someone suggests to delete this .sock file, But in my case, I couldn’t catch the file.
This is not a fundamental solution, but now my server is working well!!