tags:

views:

34

answers:

2

Hi everyone:

"Can't connect to MYSQL server" error. The DB is a separate server. http://dpaste.com/99702/

I typed "nc dbserver 3306" and it returned: [XXXXXX] 3306 (mysql) : Connection refused

Even in my GRANT options, I specified GRANT ALL TO . %...

My friend said that the web server is being prevented from establishing a TCP connection of any kind to that port.

I checked my.cnf...nothing special there. Could it be because of my IPTABLES?

Thank you

A: 

It could well be the case that the host on which mysqld is hosted is not allowing connections on the default mysql port 3306. Also, additionally, you may want to ensure that mysqld is not running with the --skip-networking option, which sets mysqld to not listen for TCP/IP connections.

ayaz
+1  A: 

Your friend is right. The remote server refused the connection. Either the MySQL server is not running, or something (a firewall?) is preventing the connection from going through.

Charles
iptables. was the problem
TIMEX