From owner-freebsd-questions@FreeBSD.ORG Sun Jan 15 18:03:31 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 4BAFE1065670 for ; Sun, 15 Jan 2012 18:03:31 +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 B5E668FC12 for ; Sun, 15 Jan 2012 18:03:30 +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 q0FI3Rop096917 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 15 Jan 2012 18:03:27 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.1 smtp.infracaninophile.co.uk q0FI3Rop096917 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1326650607; bh=wLZ6tOta5LlqGAtosMu2iOH/GGD/rBiiNLzzU6lK1sg=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc; b=SiC1r543if9OZNSVn8P/7Wc+k6k88UEX2lKlrpoOAA5g/HHw+Z/UrdM7jxTQNCxoR YseX1pgrg+KscgZ4ktmrXP8tdLazRwqHGn5NruLZqPIBB0DRr7NEVNimnq0WsrqzeY 8i27GbS8Q7G8tVwL96MlIFhgyBDOoZD4bk+tp6wo= Message-ID: <4F1314EE.6010404@infracaninophile.co.uk> Date: Sun, 15 Jan 2012 18:03:26 +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> <4F952937-843B-4E38-B168-4E1720555D89@gmail.com> In-Reply-To: <4F952937-843B-4E38-B168-4E1720555D89@gmail.com> X-Enigmail-Version: 1.3.4 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig36C88118D4B21B3CC7716662" 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 18:03:31 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig36C88118D4B21B3CC7716662 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 15/01/2012 17:50, Paul Beard wrote: > The app configurations are not this granular: hostname and port are > configured but there is nothing that makes clear that IF you specify > localhost, you WILL BE using a domain socket which MUST BE > /tmp/mysql.sock and IF you move it or your distribution prefers some > other location you MAY NOT use localhost as you are now using a TCP > socket which shouldn't require a hostname but because of the way the > app is written, it does. You can specify an alternate socket location in your connection parameters. For the command line client, it is: mysql -S /var/run/mysql/sock This doesn't help if you say 'mysql -h localhost' and get diverted to use the default socket though -- in that case you can have a .my.cnf file containing (inter-alia) [client] socket =3D /var/run/mysql/sock For the various language APIs, you generally need to specify a DSN string -- usually this looks something like mysql:database=3D$database;host=3D$hostname;port=3D$port but for a socket connection you could say instead: mysql:database=3D$database;mysql_socket=3D/var/run/mysql/sock =2E.. assuming that whoever wrote the application you're using made it sufficiently flexible as to be able to accept something like that. 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 --------------enig36C88118D4B21B3CC7716662 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/ iEYEARECAAYFAk8TFO4ACgkQ8Mjk52CukIwAIgCeJ/D8sh+LrdoNJmO3c08rqQJD JHcAn3yP2gOOo0ljgeOvdx8Q5hGNjtwa =xVXp -----END PGP SIGNATURE----- --------------enig36C88118D4B21B3CC7716662--