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?


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`).

  • 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
  • 2
    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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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