Solve MySQL startup error

1 Error message

When starting MySQL today, it was found that the startup failed. The error message of MxSrvs is as follows:

MySQL Start Failure,Please check the related logs
MySQL Start Failure,Please check the related logs

2 View log

Locate today’s ERROR log. The
Insert picture description here
specific error messages are as follows:

2021-01-14T10:05:04.821628+08:00 0 [ERROR] [MY-010259] [Server] Another process with pid 1033 is using unix socket file.
2021-01-14T10:05:04.822136+08:00 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2021-01-14T10:05:04.823013+08:00 0 [ERROR] [MY-010119] [Server] Aborting

mysql.lockThe role of the file: When the mysql host and client are on the same host (physical server), unix domain socket is used as the carrier of the communication protocol, which is faster than tcp.

3 solution

  • Found in the log file mysql.lockfile.
    Insert picture description here
    (If you are afraid of something wrong, you can back it up and then delete it)

  • Delete the sock file (delete the two files below)
    Insert picture description here

  • Restart the service

Reference article:

  1. https://zhuanlan.zhihu.com/p/38949932

Guess you like

Origin blog.csdn.net/qq_43085611/article/details/112602023