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

When using a MySQL client (e.g. mysql or phpmyadmin) how can I determine whether it connected to the server using a Unix socket file or by using TCP/IP?

share|improve this question
up vote 0 down vote accepted
  • mysql client: use the \s (or status) command. The output would have a line like one of the following:
Connection:             Localhost via UNIX socket
  • phpmyadmin: on the "Home" page search for Server:, e.g.

Server: Localhost (Localhost via UNIX socket)

netstat and sockstat (in FreeBSD) can be used to obtain this information in shell.

share|improve this answer

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.