Allowing remote connections to mysqld
I have a linode with 2 ips and a mysql server running but no matter what I try, I can't connect it from the outside, not even telnet it.
$ mysql -h 70.85.31.xxx -u test
ERROR 2003 (HY000): Can't connect to MySQL server on '70.85.31.xxx' (110)
$ telnet 70.85.31.xxx 3306
Trying 70.85.31.xxx…
telnet: connect to address 70.85.31.xxx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
$ telnet 67.18.186.xxx 3306
Trying 67.18.186.xxx…
telnet: connect to address 67.18.186.xxx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
My mysql server is working fine with connections from inside. I don't have 'skip-networking' in my my.cnf.
I'm using firehol for firewalling and is set to allow connections to port 3306. But even stopping firehol, it won't allow connections. Httpd, ftpd, sshd, etc.. are working just fine.
Anyone knows what the problem is?
Thanks.
3 Replies
It's set to 127.0.0.1 by default, you need to change that to your public IP in order to connection from the outside world.
(May vary a bit depending on your version of mysql, distro, etc)
Thanks Boone!