From: Dan Nelson Date: March 14 2003 9:22pm Subject: Re: forcing mysql client to use TCP socket? List-Archive: http://lists.mysql.com/mysql/134780 Message-Id: <20030314212219.GE83765@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Mar 14), Murad Nayal said: > how can I force mysql interactive client (actually the client library as > well) to use a TCP port on the local host > > if I do: > > mysql -h localhost -u user -p --port=2000 > > I get: > > ERROR 2002: Can't connect to local MySQL server through socket > '/tmp/mysql.sock' "localhost" is a special hostname to mysql: it tells it to use the local Unix socket. To talk to a local mysqld server through TCP, use "127.0.0.1", or any other IP address configured on the machine. It'll be a bit slower than using a Unix socket, though. -- Dan Nelson dnelson@stripped