Thursday, March 13, 2008

Fedora 8 ERROR 2003 (HY000): Can't connect to MySQL server

On a fresh install of Fedora 8 with any version of MySQL installed via and installation method (yum, source, rpm) you will get a connection refused error when attempting to connect from a remote server.

Most of the results on google are related to the my.cnf files having skip-networking enabled or using bind-address with 127.0.0.1 or some other incorrect ip address.

The my.cnf on fedora 8 comes default with none of these issues and does not need to be edited.

The problem is a firewall that is installed by default and prevents all incoming connections on 3306.

You can edit or disable the firewall altogether with the following command.

system-config-firewall

I found it incredibly frustrating that a linux distro comes with a enabled firewall out of the box. My past experience has been with Slackware and FreeBSD which don't do anything for you, the later does not even come with bash. It should have at least been a configuration option. Just my two cents.

No comments: