Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just setup a new DB server replacing one that has been live for 5+ years. I normally set the db connections in the host file but now that the new server is up I still see some connections to the old server how can I track down where those connections are coming from?

share|improve this question

If you log into the old MySQL server and run the following:

mysql> show processlist;

You should see a list of all active connections, with the source host in the 3rd column. It should be of the form:


Where serverhost is the hostname you're looking for and 12345 is the source port. If you want to track down the process that's connecting to MySQL, on serverhost run the following:

serverhost# lsof -i :12345

You should get something like this:

program 5954 root   27u  IPv4 -780315302       TCP serverhost:12345->mysqlserver:mysql (ESTABLISHED)

So in this example, command program at PID 5954 is the offender.

Hope this helps.

share|improve this answer

You can view same informations explained by vmfarms also using Mysql Administrator (old gui) or Mysql WorkBench, into the section "Server Connections", after you login into the server as root.

share|improve this answer

Your Answer


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