I am connecting to another system's MySQL in our local network. This is what I did:
import MySQLdb
db = MySQLdb.connect('192.168.100.30','nvnew','nvnew','disdb')
cur = db.cursor()
This is the error I got:
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '192.168.100.30' (111)")
I have created the user 'nvnew', granted all the privileges, even manually logged in by that user name to test, so i don't know why the error is coming. I searched google and read all the answers still unable to solve this as everywhere, they show this syntax as correct.
I read somewhere to comment the line
bind-address = 127.0.0.1
in /etc/mysql/my.cnf file. I did that but still I am getting the same error. Also, while connecting to remote system's mysql from my system's terminal using.
mysql -h 192.168.100.30 -u nvnew -p
I was unable to get connected to that.
Can you help?