Web Server Can't Connect to Database Server
I'm unable to connect to MySQL from the web server. It hangs on SYN_SENT (using tcptrack) and fails after a short time.
I'm trying to connect using
mysql -u <username> -h <database-private-ip> -D <database-name> -p</database-name></database-private-ip></username>
from the web server.
It fails with the error
ERROR 2003 (HY000): Can't connect to MySQL server on '<database-private-ip>' (110)</database-private-ip>
I'm able to connect to mysql from the database server with the same credentials (as expected). The bind-address in my.cnf is set to 0.0.0.0. And I can ssh from the web server to the database server.
Can anyone offer some guidance on how to get these two communicating successfully?
1 Reply
OR
Check if machine's local firewall is not enabled. And if its enabled then make sure that port 3306 is open.