If you are encountered any problem to access the MYSQLdb server through a VPN with error message:
OperationalError: (2003, "Can’t connect to MySQL server on ‘MY_IP’ (10061)")
The simple solution of this problem is:
Open a cmd window if you are using Windows replace 192.168.201.1 with the IP or hostname of your mysql server. If it’s blocked you will see something
$ telnet 192.168.201.1 3306Trying 192.168.201.1...
and eventually a timeout.
If you can reach the port then you should see something similar to:
$ telnet 192.168.201.1 3306Trying 192.168.201.1...Connected to 192.168.201.1.Escape character is '^]'.?5.1.37-1ubuntu5.1C[&Elne0d])O5ZG4mKmdConnection closed by foreign host.
MySQL only allows TCP connections from localhost – assuming your python application is running on the same machine as MySQL, ensure that your MySQL bindings are to the local IP address, and that there is no firewall on the machine preventing connections on port 3306.
Last 5 posts in Coding
- Best and simplest Algorithm to understand Factorial and Triangular value - July 22nd, 2010
- Simplest way to learn C language: Best and simplest Algorithm to understand iterative & nested If condition- Part 2 - July 20th, 2010
- Simplest way to learn C language: Best and simplest Algorithm to understand If condition- Part 1 - July 7th, 2010
- Simplest way to learn C Language: Coding in C language made easy - June 30th, 2010
- Automatically Empty WordPress Trash In “X” Number Of Days | WordPress Tips & Tricks - May 28th, 2010
