MySQL Forums
Forum List  »  Newbie

Can't Connect... IPTables?
Posted by: Kyle Mechler
Date: November 17, 2009 10:26AM

I'm trying to get my redhat server to allow remote mysql connections. I connect from another machine using:

mysql -u user -p -h my.machine.address

This gives me the following error:

ERROR 2003 (HY000): Can't connect to MySQL server on 'my.machine.address' (10060)

If I stop iptables, everything works fine. This leads me to believe that I need a rule in my iptables to allow for this connection, so I've added the following line:

-A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

I understand that this is a bit wide for now, but this is purely experimental, so that's okay for the moment.

I start iptables back up, restart networking (tried other orders though they shouldn't matter, etc) and the problem persists, error 2003. Do I need to make some other change to convince iptables to allow mysql connections to come through on port 3306? Just to clarify, bind-address is not used in my /etc/my.cnf and it is correctly set to run on port 3306.

Options: ReplyQuote


Subject
Written By
Posted
Can't Connect... IPTables?
November 17, 2009 10:26AM
November 17, 2009 01:40PM
November 17, 2009 02:41PM
November 18, 2009 02:45PM
November 18, 2009 04:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.