Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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 called mysql.lock usually) and delete it before you restart the service.

share|improve this answer

This would happen if the mysql server exits abnormally. Can you check the mysql server logs.

share|improve this answer
    
If it exits abnormally it's unable to start again? What causes that? Is it documented? Is there something I can do to force the restart of the service? –  Will Jul 28 '09 at 10:07
    
The MySQL error logs only show me the error I spoke about, [ERROR] Do you already have another mysqld server running on port: 3306 ?, even though there's no MySQL processes running and netstat and tcpview both show nothing running on port 3306. I then can't start MySQL on ANY port until I reboot. –  Will Jul 28 '09 at 10:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.