I am trying to make a query with the following code:
import MySQLdb
connection = MySQLdb.connect(host = "192.168.2.205", user = "root", passwd = "klasikaK1", db = "myDatabase")
as you can see I am targeting another machine inside the local network. I have other type of application (.war project) where the connection works, with the provided user and pass. So the remote machine's port is open and working. I just cant get my python script to do a query this way.
The error i get is something along the lines of "cannot connect to db"
I am developing this python script in Ubuntu 14.
EDIT1 Here is the 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 to MySQL server on '192.168.2.205' (111)")