Every few days, we have a server that has the MySQL service stop working. If you try to restart it, it says that another instance of MySQL may already be running on that port. The problem is, there isn't another instance of MySQL running. Additionally, nothing is touching that port according to both TCPView and Netstat. A socket connection to the port fails as if nothing is listening as well. Upon server restart, everything works correctly.
We've tried resetting the TCP/IP stack and upgrading MySQL. If we change the MySQL configuration to run on a different port, no matter what port we chose, it has the same issue. Not sure where to go from here and would love some suggestions.
Most likely the mysql lock file still exists, and is being stored in a temporary directory (thus the reboot fixing things). Find this file (it's at the config variable
$lock_file_path
and is calledmysql.lock
usually) and delete it before you restart the service.This would happen if the mysql server exits abnormally. Can you check the mysql server logs.