Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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
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

Your Answer

 
discard

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.