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

I've tried to comment out the port and bind-address directives in the my.cnf to mysql use only unix socket, but in this case the server uses the default port configuration and default bind address. Is there any solution to use the mysql only on unix socket?


share|improve this question
Ok can your explain your ambition? I think mysql need an ip-adress and when you uncomment the line its normal that he use the default ip and port. – Stony Mar 5 '11 at 15:42
up vote 7 down vote accepted

Add to your my.cnf:


This is recommended practice when there is no reason for it to listen on TCP.

share|improve this answer

By default this line 'SKIP-NETWORKING' is commented

share|improve this answer
uncomment it and restart the service – Sim Mar 5 '11 at 17:02
ohh, yes, but it seemed like the end of a comment, that's why I didn't see it... – Nucc Mar 5 '11 at 18:18

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.