Problem connecting to remote mysql via private ip

i am trying to connect to a mysql database from another linode in the same datacentre using a private ip. i am on centos 6.

there are private ips in both linodes.

i have done the following:

created a remote user in the database allowing access from the connecting server

created a php function which connects to the private ip address of the mysql server using the remote user's login details

adjusted the iptables to allow input using the connecting server's private ip address on port 3306

i also tried to use the bind-address setting in my.cnf in the mysql server but disabled it as it would not let me connect normally.

it returns a 2003 error in the php script

i also tried connecting via ssh but got " Can't connect to MySQL server on '192.168.xxx.xxx' (110)"

can anyone provide any advice on where to go to from here?

1 Reply

adjusted the iptables to allow input using the connecting server's private ip address on port 3306

Have you verified connectivity from your php linode to your mysql linode on port 3306 over TCP?

telnet <mysql host ip> 3306

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct