From owner-freebsd-questions@FreeBSD.ORG Sun Jan 15 17:53:15 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA47106566C for ; Sun, 15 Jan 2012 17:53:15 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id E54648FC21 for ; Sun, 15 Jan 2012 17:53:14 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q0FHrAjX096637 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 15 Jan 2012 17:53:10 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.1 smtp.infracaninophile.co.uk q0FHrAjX096637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1326649991; bh=wAyvmadm7NQwY1ZrzcHnPZY4OsHYDmv9GohqqFZ8wtQ=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc; b=SMUCHFYRnuhXxQr8UsjRkgHBbaQLCywRQt1p2xZvz/DUVSaAYvF7bW16PvMquxVTl +FNtsviXhlsrstAeZTsdgb0MF26dXtIcOz4WodyXI61w9ea936pVBmK0THvbSAvTNe 1qPBsGzTcB7ePQqp9m/mSQozjyRezipGAoWGkGhE= Message-ID: <4F13127C.6060408@infracaninophile.co.uk> Date: Sun, 15 Jan 2012 17:53:00 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org 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> In-Reply-To: <0E0B740B-4E2C-41C8-A8A4-BC92DC0D7089@mac.com> X-Enigmail-Version: 1.3.4 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig607555994AE9F9C9D873C04D" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Subject: Re: database apps that ignore sockets? [was: Solution: mysqld fails to run, can't create/find mysql.sock] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2012 17:53:15 -0000 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--