Skip to content Skip to sidebar Skip to footer

OperationalError: (OperationalError) (2003, "Can't Connect To MySQL Server On '192.168.129.139' (111)") None None

I am trying to create a remote database using mysql on an Ubuntu machine running 12.04. It has a root user with remote login enabled and no password.I have started the server. outp

Solution 1:

Looks like the mysql server 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 (=MySQL daemon) 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, in your case, replace 192.168.0.5 with 192.168.129.139.

From:

bind-address            = 192.168.0.5

to:

bind-address            = 192.168.129.139

If there is no such entry and you cannot connect, create a new line. You may also try commenting out the line instead.

After making a change to /etc/mysql/my.cnf the MySQL daemon will need to be restarted:

sudo systemctl restart mysql.service

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


Post a Comment for "OperationalError: (OperationalError) (2003, "Can't Connect To MySQL Server On '192.168.129.139' (111)") None None"