Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2012 17:53:00 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: database apps that ignore sockets? [was: Solution: mysqld fails to run, can't create/find mysql.sock]
Message-ID:  <4F13127C.6060408@infracaninophile.co.uk>
In-Reply-To: <0E0B740B-4E2C-41C8-A8A4-BC92DC0D7089@mac.com>
References:  <0F82362E-2694-4EBC-B019-DE2F2C160D45@gmail.com> <7325D262-C6EB-42DB-870D-D3E2FAC9D0C1@mac.com> <1954AA20-BE6F-4F04-A770-49ECFA405B5D@gmail.com> <3D14230E-7E8A-4E35-8161-F5F9CB74C83C@mac.com> <3720E228-67EE-4F44-B828-AFA0125D2A54@gmail.com> <0E0B740B-4E2C-41C8-A8A4-BC92DC0D7089@mac.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig607555994AE9F9C9D873C04D
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 15/01/2012 17:20, Chuck Swiger wrote:
> If you specify a hostname and port via "--host=3Dlocalhost
> --port=3D3306", 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=3DTCP argument

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enig607555994AE9F9C9D873C04D
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8TEoUACgkQ8Mjk52CukIzbbgCfbSEztHNeyA8Vs7MecnyHSR/4
RRcAoILXYSSmnbh9u80FIVFVT/btsYQZ
=agkq
-----END PGP SIGNATURE-----

--------------enig607555994AE9F9C9D873C04D--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4F13127C.6060408>