How can I find the Unix process that owns a local Sleeping MySQL connection? How can I find the Unix process that owns a local Sleeping MySQL connection? unix unix

How can I find the Unix process that owns a local Sleeping MySQL connection?


If the connections were made over a local socket, you might have some luck with sudo fuser -u /tmp/mysql.sock. You could also find mysql's process ID (let's call it $MYSQL_PID) and then run sudo lsof -p $MYSQL_PID, which will include all open sockets.


If you can, change the way you are connecting to the mysql server by using 127.0.0.1 instead of localhost.

By doing that, a tcp/ip connection will be used and you will have in the processlist the port number that you can use to trace back to the process.

A tcp/ip connection is slower than a unix file socket connection, but it'll do the trick.

references :

http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html

http://dev.mysql.com/doc/refman/5.1/en/connecting.html


Check which application uses "svcObjects" database with user "svcControl". This will lead you to the problem root I guess.