OpenVZ Forum


Home » General » Support » *SOLVED* Can't connect to mysql in VE
*SOLVED* Can't connect to mysql in VE [message #8603] Wed, 29 November 2006 04:09 Go to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
Hi,

I have two VEs setup correctly and I am running mysql daemon in one VE. I can connect to the mysql daemon from HN but cannot connect to it from the other VE or from outside. On the other hand, I can ping the machine and even ssh into it. The setup is as follow.

I assign 15.25.117.{48,49} to the VEs and 15.25.117.31 is the HN's ip address.

Run mysql in 15.25.117.49. Now, in 15.25.117.48
-bash-3.1# mysql -h15.25.117.49 -utest_rubis
ERROR 2003 (HY000): Can't connect to MySQL server on '15.25.117.49' (113)

On 15.25.117.31
[root@acts-01-eth1 ~]# mysql -h15.25.117.49 -utest_rubis
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 5.0.27-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Let me know how to fix this problem. Thanks !
Pradeep

[Updated on: Thu, 30 November 2006 06:50] by Moderator

Report message to a moderator

Re: Can't connect to mysql in VE [message #8604 is a reply to message #8603] Wed, 29 November 2006 07:19 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Do you use iptables?
Re: Can't connect to mysql in VE [message #8626 is a reply to message #8604] Wed, 29 November 2006 16:59 Go to previous messageGo to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
Nothing other than the default stuff. Actually, I have switched it off on the VEs and HN, but still the same result. The interesting part is that I can ssh to the VE.

Pradeep
Re: Can't connect to mysql in VE [message #8628 is a reply to message #8603] Wed, 29 November 2006 17:08 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
To troubleshoot this, you should first use a low level debugging technique like tcpdump. This will establish whether the problem is on the network level or the application level. For example, in your VE:

# tcpdump -i venet0 dst port 3306

from the HN or wherever you want to connect to the mysqld server from, run in a seperate console:

# telnet VE_IP 3306

replace VE_IP with the IP address of your VE. If after running telnet, you see lines below your tcpdump then this succeeded, otherwise it failed.

-----------------
if this succeeds:
I doubt it will, but it must be a configuration in your mysqld. try backing up your data, uninstalling mysqld, and throwing a fresh mysqld rpm in there.

-----------------
if this fails:
check iptables on the HN and the VE. This is definately the problem especially considering you can ssh to the VE which means networking is working.


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Can't connect to mysql in VE [message #8636 is a reply to message #8628] Wed, 29 November 2006 19:55 Go to previous messageGo to next message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
I don't think it's a problem with MySQL config. I can connect from HN to the VE MySQL. So, it must be some kind of routing problem.

I will try debugging with tcpdump and see how it goes.
Re: Can't connect to mysql in VE [message #8637 is a reply to message #8626] Wed, 29 November 2006 20:04 Go to previous message
Pradeep Padala is currently offline  Pradeep Padala
Messages: 18
Registered: June 2006
Junior Member
I just checked again and I forgot to turn off iptables on HN which was causing the problems. Turning it off fixed the problem.

Thanks !
Previous Topic: *SOLVED* iptables not working in VE
Next Topic: Swap in OpenVZ
Goto Forum:
  


Current Time: Sat Nov 16 14:18:22 GMT 2024

Total time taken to generate the page: 0.02946 seconds