Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2012 09:20:35 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Paul Beard <paulbeard@gmail.com>
Cc:        FreeBSD-questions <questions@Freebsd.org>
Subject:   Re: database apps that ignore sockets? [was: Solution: mysqld fails	to run, can't create/find mysql.sock]
Message-ID:  <0E0B740B-4E2C-41C8-A8A4-BC92DC0D7089@mac.com>
In-Reply-To: <3720E228-67EE-4F44-B828-AFA0125D2A54@gmail.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>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Jan 15, 2012, at 8:43 AM, Paul Beard wrote:
> Useful clarification but a UNIX domain socket sounds less like networking and more like interprocess communication, i.e., something explicitly tied to a single host.

Yes, that's right.

> There is a "skip networking" option for MySQL that references the domain socket for use by processes on the same host but doesn't accept connections on port 3306.

That also sounds familiar.

> There's no indication that using localhost will default to a domain socket which will explicitly be looked for in /tmp and if you put it anywhere else, you must specify a hostname to access the TCP socket. 

You're confusing two things which are different.

If you specify a path via "--socket=/tmp/mysqld.sock", you are describing a UNIX domain socket.  While you can also specify "--host=localhost", 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.

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.

> I'll quote your definition in the bug report as it seems crystal clear. 

I would have said that the documentation seem clear as well:

  http://dev.mysql.com/doc/refman/5.5/en/multiple-server-clients.html
  http://dev.mysql.com/doc/refman/5.5/en/multiple-unix-servers.html

...but there's evidently some confusing aspect.

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?0E0B740B-4E2C-41C8-A8A4-BC92DC0D7089>