Hi I have a Mysql db running on a ubunutu 10 server (hosted on Rackspace).
I'm trying to connect to this from a windows server that hosts my ASP.net website.
I've set up a Mysql User for the IP of the windows server
I've set my iptables to the following:
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [56:11468]
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED, ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -j DROP
COMMIT
If I specifiy the port 3306 in my connection string I get a SocketException telling me that the name is valid but no data of the requested type was found.
If I don't specify the port in my connection string I get a "No connection could be made because the target machine actively refused it ubuntu Ip: 3306"
I'm not really sure where to go with this but my gut instinct is that it is firewall related?
Any suggestions or advice would be greatfully received?
!!! As written in the comment to Maliq --- I hadn't changed the bind-address in mysql cnf to 0.0.0.0 from 127.0.0.1 I can't answer the question for another 8 hours as I haven't got enough server fault rep :(
netstat -an | fgrep 3306will reveal it. – mailq Oct 18 '11 at 11:32