Configure MySQL server to use TCP connections instead of Unix sockets?

Last Updated on July 26, 2015 by admin

Comment out the option:


in the file:


which typically lies in the directory /etc or /etc/mysql.

Then restart your MySQL server:

service mysql restart


/etc/init.d/mysql restart

with the command:

netstat -ta

you can check if MySQL is reachable via TCP.

Leave a Comment