From owner-freebsd-questions@FreeBSD.ORG Fri Jul 11 13:54:19 2008 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 57B47106564A for ; Fri, 11 Jul 2008 13:54:19 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: from ibctech.ca (v6.ibctech.ca [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id DE81F8FC15 for ; Fri, 11 Jul 2008 13:54:18 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: (qmail 86933 invoked by uid 89); 11 Jul 2008 13:57:06 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by 2607:f118::b6 with ESMTPA; 11 Jul 2008 13:57:06 -0000 Message-ID: <48776604.4070403@ibctech.ca> Date: Fri, 11 Jul 2008 09:54:12 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: =?ISO-8859-1?Q?=D2=E0=F0=E0=F1?= References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: Can't connect to local MySQL server through socket '/tmp/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: Fri, 11 Jul 2008 13:54:19 -0000 Тарас wrote: > Hi! I need two MySQL servers run simultaneously. But when I try to run server I have > > ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Does this happen when you try to start the first instance, or starting the second instance when you already have one started. If the latter is the case, you are going to have to tell the second instance to use a different socket file. # touch /tmp/mysql.sock2 # chmod mysql_user:mysql_group /tmp/mysql.sock2 ....and then, I believe if you add this to your /etc/my.cnf file: [mysqld] socket=/tmp/mysql.sock2 This should start at least one of your instances on the new socket, leaving the other one alone. Note: I have not tested the above, its off the top of my head. Be worth Googling for verification. Steve