Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

With netstat -a I can see all connections from my machine to the MySQL Server. There is any way too see which process or executable is responsible for each connection?

The only solution I found so far is to listen the packets and analyse the data inside it. But what if the data couldn't provide information about the process?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Use the -b switch as well:

  -b            Displays the executable involved in creating each connection or
                listening port. In some cases well-known executables host
                multiple independent components, and in these cases the
                sequence of components involved in creating the connection
                or listening port is displayed. In this case the executable
                name is in [] at the bottom, on top is the component it called,
                and so forth until TCP/IP was reached. Note that this option
                can be time-consuming and will fail unless you have sufficient


$netstat -ab

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    john:epmap             john:0                 LISTENING       1404

  TCP    john:3150      SYN_SENT        392

  TCP    john:3155      SYN_SENT        392

  TCP    john:3157      SYN_SENT        392
share|improve this answer
Ah, I like your answer better. Upvote! –  dsolimano Apr 20 '10 at 16:50

Sysinternals Process Explorer tells you which connections are open by application, though I don't know if there is a way to do the reverse look up by connection. If you don't have too many processes to check, this should work.

share|improve this answer

Your Answer


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.