On 15/01/2012 17:20, Chuck Swiger wrote: > If you specify a hostname and port via "--host=localhost > --port=3306", then you are describing a TCP socket. There is no > pathname involved. You could connect regardless of where mysqld is > putting the socket.
Some MySQL clients will gratuitously change a connection attempt to localhost to use the /tmp/mysql.sock unix domain socket because it does perform a bit faster, and it seems they don't expect their users to just ask for a socket connection explicitly. You can test this fairly simply: set up your server with 'skip-networking' temporarily and try making client connections to it. Of course, for some language API's there's no option but to use a network socket -- Java being a case in point -- but that's the exception rather than the rule. To force the command line mysql(1) client to use a network connection to localhost you need to use the --protocol=TCP argument Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature