Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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 am executing Show Full Processlist; and output does not show client port for some hosts in Host column

Documentation says that each and every connection has host:client_port format.

My question is for some of the host column it just shows localhost without client port

What could be the reason behind this?

share|improve this question

The reason is that it's not connected via TCP/IP, so there isn't a port.

MySQL allows local clients to connect via a "socket file", which is located on the file system (/var/lib/mysql/mysql.sock, for example`).

share|improve this answer
I will verify whether any connection is connected through socket – Mahesh Patil Oct 16 '12 at 9:19
It's not through socket, it's using SSH connection (TCP connection) – Mahesh Patil Oct 16 '12 at 10:58
It isn't possible to connect to MySQL "using SSH." If you mean that you are are using SSH to log in to the machine where MySQL is running, and then typing "mysql" to interact with the server, the "mysql" command line client is the client -- not you, on the originating side of that SSH connection -- and the client is indeed connecting from "localhost" and most likely it will use the socket, not TCP... which causes the behavior you observed. @Phil is correct. +1 – Michael - sqlbot Oct 17 '12 at 1:10

A colleague of mine just found a bug where the client_port portion of this field is not populated on a 5.0 server if you start with --skip-grant-tables

You can see the host, but the port is not displayed.

Starting without that option restores the ability to see the port in this field.

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.