[ACCEPTED]-Trying to connect to remote MySQL host (error 2003)-mysql-error-2003
Based on your response, you need to find 6 if there is a device between you and the 5 server that blocks your connection. You 4 should also ensure that you can telnet to 3 3306 on that server's ethernet address when logged into the server... if 2 not, you probably have not got the service 1 bound to the ethernet in my.cnf
... see the bind-address
parameter.
You should check your MySQL Server configuration 5 to see if it bind to 127.0.0.1, then you 4 can only connect to mysql if your app is 3 on same server. There's an easy way, to 2 have webamin installed and you can control 1 via web interface.
This may due to 3306 port is closed , check 9 your server port status
http://www.yougetsignal.com/tools/open-ports/
If it shows closed, that 8 means you can't access it from out side 7 the machine , to open the port
ufw - Uncomplicated 6 Firewall
The default firewall configuration 5 tool for Ubuntu is ufw. The following are 4 some examples of how to use ufw:
First, ufw 3 needs to be enabled. From a terminal prompt 2 enter:
sudo ufw enable
To open a port (mysql):
sudo ufw allow 3306
To see the 1 firewall status, enter:
sudo ufw status
If you use VPN connection to connect remote 11 database server and you got this kind of 10 error then just check it out two simple 9 steps...
1) In windows machine, please go 8 to "Control Panel\Network and Internet\Network 7 Connections" path and right click on local 6 area network and go to properties. Click 5 on TCP/IPv4 and go the properties. Make 4 sure the IP and DNS server(if you use DHCP 3 or not?).
2) After this please restart the 2 Machine and check it out again.
Hope this 1 will work. In my case it works.
Note: Please make sure all your settings are correct. This answer is funny but it works in my case :)
Thanks!
for me this was to enable the port 3306 3 in /etc/default/iptables
file to allow the incoming traffic 2 from any host by uncommenting the below 1 given line:
#-A INPUT -p tcp --dport 3306 -j ACCEPT
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.