python - How to configure MySql db module in order to connect to a remote server? -


i trying make query following code:

import mysqldb connection = mysqldb.connect(host = "192.168.2.205", user = "root", passwd = "klasikak1", db = "mydatabase") 

as can see targeting machine inside local network. have other type of application (.war project) connection works, provided user , pass. remote machine's port open , working. cant python script query way.

the error along lines of "cannot connect db"

i developing python script in ubuntu 14.

edit1 here full traceback:

traceback (most recent call last):   file "/home/devf13/sda.py", line 3, in <module>     connection = mysqldb.connect(host = "192.168.2.205", user = "root", passwd = "klasikak1", db = "mydatabase")   file "/usr/lib/python2.7/dist-packages/mysqldb/__init__.py", line 81, in connect     return connection(*args, **kwargs)   file "/usr/lib/python2.7/dist-packages/mysqldb/connections.py", line 187, in __init__     super(connection, self).__init__(*args, **kwargs2) _mysql_exceptions.operationalerror: (2003, "can't connect mysql server on '192.168.2.205' (111)") 


Comments