Connection to mysql-VE failed. [message #25411] |
Sun, 23 December 2007 23:22 |
Kutschka
Messages: 24 Registered: February 2007
|
Junior Member |
|
|
Hello,
I try to connect to VE-Mysql from VE.
(The VE-MySql is not reachable from outside/internet.)
VE: 192.168.1.1
VE-MySql : 192.168.1.2
I become the error:
"Error: 2003 (Can't connect to MySQL server on '192.168.1.2' (111))"
And for debug in the VE-MySql:
# tcpdump -i venet0 dst port 3306
in the VE:
# telnet 192.168.1.2 3306
=>Trying 192.168.1.2...
telnet: Unable to connect to remote host: Connection refused
I read the thread
http://forum.openvz.org/index.php?t=msg&goto=8628&
Quote: |
...check iptables on the HN and the VE....
|
But what shoud I do with iptables? Do I need to route the port, even the mysqlVE is only internal reachable?
Thank you,
Kutschka
|
|
|
Re: Connection to mysql-VE failed. [message #25414 is a reply to message #25411] |
Mon, 24 December 2007 00:15 |
ugob
Messages: 271 Registered: March 2007
|
Senior Member |
|
|
Kutschka wrote on Sun, 23 December 2007 18:22 | Hello,
I try to connect to VE-Mysql from VE.
(The VE-MySql is not reachable from outside/internet.)
VE: 192.168.1.1
VE-MySql : 192.168.1.2
I become the error:
"Error: 2003 (Can't connect to MySQL server on '192.168.1.2' (111))"
And for debug in the VE-MySql:
# tcpdump -i venet0 dst port 3306
in the VE:
# telnet 192.168.1.2 3306
=>Trying 192.168.1.2...
telnet: Unable to connect to remote host: Connection refused
I read the thread
http://forum.openvz.org/index.php?t=msg&goto=8628&
Quote: |
...check iptables on the HN and the VE....
|
But what shoud I do with iptables? Do I need to route the port, even the mysqlVE is only internal reachable?
Thank you,
Kutschka
|
The iptables rules should be nothing.
Can you ping the host from inside?
Can you, from the mysql-ve, ping anything outside? Are you sure you set the IP address correctly?
Are you sure that mysql is started in the mysql-ve?
Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf
Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
[Updated on: Mon, 24 December 2007 00:15] Report message to a moderator
|
|
|
|
Re: Connection to mysql-VE failed. [message #25423 is a reply to message #25420] |
Mon, 24 December 2007 11:37 |
Kutschka
Messages: 24 Registered: February 2007
|
Junior Member |
|
|
Hello,
Can you ping the host from inside?
=> Yes.
Can you, from the mysql-ve, ping anything outside? Are you sure you set the IP address correctly?
=> Yes I can ping from each other..
Are you sure that mysql is started in the mysql-ve?
=> Yes its running..
Any idea?
[Updated on: Mon, 24 December 2007 11:48] Report message to a moderator
|
|
|
Re: Connection to mysql-VE failed. [message #25424 is a reply to message #25420] |
Mon, 24 December 2007 12:33 |
Kutschka
Messages: 24 Registered: February 2007
|
Junior Member |
|
|
curx wrote on Mon, 24 December 2007 04:51 | Hi,
mysqld is running and listen not only to 127.0.0.1 (=localhost!) ?
|
Hello,
I did comment out the line in the my.cnf
## bind-address=127.0.0.1
But now I become the error:
[email]root@server6[/email]:/# telnet 192.168.1.2 3306
Trying 192.168.1.2...
Connected to 192.168.1.2.
Escape character is '^]'.
DHost '192.168.1.1' is not allowed to connect to this MySQL serverConnection closed by foreign host.
[Updated on: Mon, 24 December 2007 12:33] Report message to a moderator
|
|
|
|