Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2012 09:20:35 -0800
From:      Chuck Swiger <>
To:        Paul Beard <>
Cc:        FreeBSD-questions <>
Subject:   Re: database apps that ignore sockets? [was: Solution: mysqld fails	to run, can't create/find mysql.sock]
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <> <>

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:

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


Want to link to this message? Use this URL: <>