List:General Discussion« Previous MessageNext Message »
From:terry jones Date:June 29 1999 12:01am
Subject:problem with 'mysql -h remote.host.com'
View as plain text  
Linux 2.3.0, mysql-3.22.23b.

When I run 'mysql -h hci.ucsd.edu' on my machine (cliffs.ucsd.edu), I
get the message:

  ERROR 2005: Unknown MySQL Server Host (hci.ucsd.edu) (-1073749148)

Strace reveals mysql is opening /etc/resolv.conf and also /etc/hosts,
but somehow there's a problem and I get the above message. I have no
problem at all contacting that machine or resolving hci.ucsd.edu via
nslookup. mysqld is running on that machine, and using mysql I can
talk to that mysqld and look at tables etc.

Here's some output from strace (note this strace output is from the
same command, but with 'hci' instead of 'hci.ucsd.edu' - both fail,
but both are fine with nslookup and both are in /etc/hosts on
cliffs).

If no-one answers, I'll have a look in the source for mysql.

Regards,
Terry.

----------------------------------------

open("/etc/resolv.conf", O_RDONLY)      = 4
fstat(4, {st_mode=0, st_size=0, ...})   = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400140
00
read(4, "search ucsd.edu \nnameserver 132"..., 4096) = 41
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40014000, 4096)                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 4
connect(4, {sun_family=AF_UNIX, sun_path="/var/run/.nscd_socket"}, 110) = -1 ECO
NNREFUSED (Connection refused)
close(4)                                = 0
open("/etc/host.conf", O_RDONLY)        = 4
fstat(4, {st_mode=0, st_size=0, ...})   = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400140
00
read(4, "order hosts,bind\nmulti on\n", 4096) = 26
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40014000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 4
fcntl(4, F_GETFD)                       = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat(4, {st_mode=0, st_size=0, ...})   = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400140
00
read(4, "#\n#\tCogSci local addresses of "..., 4096) = 4096
read(4, "bach\t00C0FO0DBABF\n132.239.6.78"..., 4096) = 4096
read(4, "tjohn.ucsd.edu\n#\n# second floo"..., 4096) = 4096
read(4, "\tcsb-24port\n# Allied telesis h"..., 4096) = 4096
close(4)                                = 0
munmap(0x40014000, 4096)                = 0
shutdown(3, 2 /* send and receive */)   = -1 ENOTCONN (Transport endpoint is not
 connected)
close(3)                                = 0
write(2, "ERROR ", 6ERROR )                   = 6
write(2, "2005", 42005)                     = 4
write(2, ": Unknown MySQL Server Host (hci"..., 48: Unknown MySQL Server Host (h
ci) (-1073749180)
) = 48
_exit(1)                                = ?
Thread
problem with 'mysql -h remote.host.com'terry jones29 Jun
  • problem with 'mysql -h remote.host.com'terry jones29 Jun