Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 2 centos5/32 VPS boxes at my provider. If it matters, they're both on OpenVZ.
BOX-A is a bare mysql server (no special other services installed)
BOX-B is a full lamp
I want to access the BOX-A mysql from BOX-B
Easy you might say, but I've tried so many things, it still won't connect. I assume my mysql on BOX-A is configured right.
I get stuck much earlier. Even a telnet from BOX-B to port 3306 on BOX-A gets a time out.
I've tried a lot of stuff in iptables, at the end I opened everything for everybody and I even removed the whole iptables service all way. It still doesn't work.
BOX-A is a test server so I cannot do anything too bad.
I reinstall it regularly.
Make sure you have not made a typo in the ip address. Make sure Box B can be reached from a manual telnet on that port. Maybe your provider has the port blocked for some reason.
Thanks for your tips.
A wrong IP is however out of the question - I was very careful with that.
Both boxes come completely unmanaged and without any port restrictions or whatsoever.
For example I can ssh from BOX-B to BOX-A without problems
A normal telnet to that machine on 3306 gives a time out however.
I cannot get it out of my head that it has something to do with the openvz. ifconfig says i have a 'venet0' instead of a 'eth0' which I would expect.
Your provider controls that aspect and you are probably correct. The hardware firewall they have may also be the problem. Venet0 is basically a virtualized connection not a hardware one. The config of openvs most likely is the culprit and would have to be changed by the provider. Unless you try a different telnet port.
Use nmap to see if the server ports is open from the client perspective. I believe MySQL runs on port 3306. If the port is open and you are still having failure to connect issues, make sure that the server is configured to accept remote connections and the user name string will need to account for the remote host name too, either as user@host or by using a wild card.
Is mysqld running, listening, and configured to listen on the right address? ie: my.cnf: bind-address= & skip-networking ?
Code:
BOXA ~ # netstat -tnlp
Can you connect to MySQL on the MySQL server locally? ie:
Code:
BOXA ~ # mysql -u someone -p
You say that "I assume my mysql on BOX-A is configured right.", why? in my experience, whenever i assume i have something configured right, and it doesnt work, it usually aint.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.