List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:March 14 2003 9:22pm
Subject:Re: forcing mysql client to use TCP socket?
View as plain text  
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
Thread
Remote AdministrationC. Reeve14 Mar
  • Re: Remote AdministrationBrian McCain14 Mar
  • forcing mysql client to use TCP socket?Murad Nayal14 Mar
    • Re: forcing mysql client to use TCP socket?Dan Nelson14 Mar
  • Re: forcing mysql client to use TCP socket?gerald_clark14 Mar
  • Re: forcing mysql client to use TCP socket?Gelu Gogancea14 Mar
  • Re: forcing mysql client to use TCP socket?Murad Nayal15 Mar