After centos is shut down abnormally, mysql cannot be started. The problem is as follows: AnotherMySQLdaemonalreadyrunningwiththesameunixsocket is because there is a mysql. sock file in the mysql installation directory. This file was created when mysql was started and deleted when mysql was disabled. If it is not properly shut down, mysql will not
After centos is shut down abnormally, mysql cannot be started. the problem is as follows: Another MySQL daemon already running with the same unix socket is that there is a mysql. sock file in the mysql installation directory. This file was created when mysql was started and deleted when mysql was disabled. If it is not properly shut down, mysql will not
After centos is shut down abnormally, mysql cannot be started. The problem is as follows:
Another MySQL daemon already running with the same unix socket
The reason is that there is a mysql. sock file in the mysql installation directory.
This file was created when mysql was started and deleted when mysql was disabled.
If it is not properly shut down, mysql will not be able to delete the file.
When this file still exists, mysql cannot be started and the above error is prompted.
In a strange situation, google and Baidu did not have a solution to this problem.
Then I can only use my own method to solve the problem, that is, before mysql is started, I will delete it if mysql. sock exists.
1 2 3 4 5 6 |
/ etc / rc.sysinit
# Clean up mysql sock
if [ - x / var / lib / mysql / mysql.sock ]; then
rm - f / var / lib / mysql / mysql.sock
fi
|
After several power outages (abnormal shutdown), mysql can be started normally.
This problem will always be solved.
Original article address: After centos is shut down abnormally, mysql cannot be started. Thank you for sharing with me.