MySQL connect by TCP instead of a Unix socket

To ensure that the client makes a TCP/IP connection to the local server, use --host or -h to specify a host name value of, or the IP address or name of the local server. You can also specify the connection protocol explicitly, even for localhost, by using the --protocol=TCP option. Examples:

mysql --host=
mysql --protocol=TCP

You can also easily make that the default my editing your my.cnf so it has this ([client] means any client:



Popular posts from this blog

Check MySQL query history from command line