OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '192.168.129.139' (111)") None None OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '192.168.129.139' (111)") None None sql sql

OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '192.168.129.139' (111)") None None


Looks like mysql is configured to listen only on localhost.

You can test this by running telnet 192.168.129.139 3306 from your client machine.

Most probable reason - mysqld is configured to do so.

Please try to follow Configuration step described here:

Edit the /etc/mysql/my.cnf file to configure MySQL to listen for connections from network hosts, change the bind-address directive to the server's IP address. For example Replace 192.168.0.5 with the appropriate address. If there are no such entry - uncomment it or create new line.

bind-address            = 192.168.0.5

Then restart mysqld

sudo service mysql restart

Then test with telnet or by running your application once again. Also netstat would have second entry for mysqld.