Take the 2-minute tour ×

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

2 Answers 2

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


