From owner-freebsd-questions@FreeBSD.ORG Sun Jan 15 17:50:46 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 959691065670 for ; Sun, 15 Jan 2012 17:50:46 +0000 (UTC) (envelope-from paulbeard@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4D5C78FC08 for ; Sun, 15 Jan 2012 17:50:46 +0000 (UTC) Received: by iagz16 with SMTP id z16so3636985iag.13 for ; Sun, 15 Jan 2012 09:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:cc :references:message-id:x-mailer; bh=zzhu2qNAg0hZIoWaCj3WZ2G9DeKu8rP5sjraZ46vMpo=; b=yE0n4kBei/kUT7xf/gcewiIXkSSNgIHcI/Chewkt0+vYOmnTIEayLqk4JQJpbQa7Ce MNrIXZVHkWLSS67/Ij7+11/CvyuwHUmp2MkJeyl+pISzyJ3MQzwGXyg08p0iTfyt2ruX ObbEise7pOUeIQ80YRSyIGog598reNEQDr3ko= Received: by 10.43.52.129 with SMTP id vm1mr7901316icb.15.1326649845931; Sun, 15 Jan 2012 09:50:45 -0800 (PST) Received: from ivoire.paulbeard.org (174-21-117-199.tukw.qwest.net. [174.21.117.199]) by mx.google.com with ESMTPS id g34sm55727568ibk.10.2012.01.15.09.50.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 Jan 2012 09:50:44 -0800 (PST) From: Paul Beard Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/signed; boundary="Apple-Mail=_4721D9E5-5DB0-4160-B92E-92E5C7B69D39"; protocol="application/pkcs7-signature"; micalg=sha1 Date: Sun, 15 Jan 2012 09:50:40 -0800 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> Message-Id: <4F952937-843B-4E38-B168-4E1720555D89@gmail.com> X-Mailer: Apple Mail (2.1251.1) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD-questions 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:50:46 -0000 --Apple-Mail=_4721D9E5-5DB0-4160-B92E-92E5C7B69D39 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 15, 2012, at 9:20 AM, Chuck Swiger wrote: > You're confusing two things which are different. At the risk of boring everyone on this list, I think I understand it as = far as I need to: I am not the developer of the app(s) that seem to = generate this issue.=20 > If you specify a path via "--socket=3D/tmp/mysqld.sock", you are = describing a UNIX domain socket. While you can also specify = "--host=3Dlocalhost", that would be ignored because it it implicit. If = you change where the socket lives in mysqld config or CLI options, you = need to change where the clients look for the socket as well. >=20 > 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. If I gave the impression I didn't understand this, my mistake.=20 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.=20 Put another way, if you specify localhost, the port is ignored: I just = tested this by setting the port to 9999 with a symlink to the socket = placed in /tmp. It worked fine. If you change the location of the = socket, you MUST use a TCP socket which mean identifying the host by = name, not as localhost, even if it is localhost. There is no way to = specify the location of the domain socket. It must be in /tmp.=20 Note I am not arguing that the use of localhost requires a named domain = socket, in UNIX, just that it does in this app.=20 I learned a couple of things here. I hope I can make them clear to the = people who need 'em.=20 -- Paul Beard Are you trying to win an argument or solve a problem?=20 --Apple-Mail=_4721D9E5-5DB0-4160-B92E-92E5C7B69D39--