[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Accessing MySQL across private network



I suppose the answer to my question is obvious, but I don't see it. I have two nearly identical Woody servers set up for LAMP on a private network. I want to access MySQL on server2 (192.168.1.4) from server1 (192.168.1.3). The user and host settings for MySQL work from either server as long as the host is localhost or the same IP or domain name. For instance, Apache/PHP on server1 can access MySQL on server1 and likewise on server2. I am wondering of hosts.allow is set incorrectly (ALL: 192.168.1.*: ALLOW) or if there is another default protection that disallows network MySQL access.

In terms of mysql commands, I cannot do the follow mysql command from server2:

mysql -hserver1 -umyuser -p

I get the error: ERROR 2003: Can't connect to MySQL server on '192.168.1.3' (111)


I can do the following from server2:

mysql -hserver2 -umyuser -p

or

mysql -hlocalhost -umyuser -p

or

mysql -h192.168.1.4 -umyuser -p

I hope this makes sense to someone. Thanks.

Mark



Reply to: