- To: Slug <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] ssh - localhost, mysql
- From: "Amos Shapira" <amos.shapira@xxxxxxxxx>
- Date: Sun, 30 Mar 2008 20:34:00 +1100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=GJ9KOp6rQSPzU56izmTIoh1C5knXq1jY4cT9IbCSQ6Y=; b=ajSdgMq5L0Asy/PflU+xIWV5mnWi4es10PAlz8hci9VnsvZgqM0o4uQxi0XlcctYHtlrOlIRY9KG8qUc9fDCPxVgZzsvgXCwqP/oN1yS0dztmDXGSPJOhcPda68WaJUj6YJLg0SnL9xcKhYtd3AsTjUX+xTnQue3sMW0A8j5OJU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=p2VqDXOqfrhf6eQHbffaoCBHYr4aG8V1J4tjK5gpVAYlcJJ7ierb7U7hrQCoorz+JcrYFAh3SzljwjQWvvfhGd6ecP/32q1OIft1ekAnC0PsVhIAJnnmep+mVqNClGi6YR3cO2N9GwSJ2yoJUd31ieoB3/sXf3T7M9SODm7jQYQ=
On Sun, Mar 30, 2008 at 4:49 PM, Sonia Hamilton <sonia@xxxxxxxxxxxx> wrote:
> And a very OT question related to this. Whenever one connects to mysql
> via localhost, mysql will use the local socket rather than connecting
> via tcp. This obviously fubar's when one has got localhost connected to
> an ssh tunnel. Anyway around this? There's a mysql option
> 'protocol=tcp', but it doesn't appear to work. There's an angst filled
> bug post about it here: http://bugs.mysql.com/bug.php?id=31577
Another of those nitty-gritty details that gives me "php deja-vu" when I
deal with MySQL - it treats the string "localhost" specially to use the
unix-domain socket (which is probably faster, what with all the tcp/ip
layers being left out of the equation).
Using "127.0.0.1" explicitly instead of "localhost" overcomes this.
--Amos