I'm trying to connect to mysqldb through a python script. I have changed the bind-address in my.cnf to '192.168.56.101' which is my server ip.
import MySQLdb
db = MySQLdb.connect(host='192.168.56.101',
user='root',
passwd='pass',
db='python')
the above code gives me following error.
_mysql_exceptions.OperationalError: (1130, "Host '192.168.56.1' is not allowed to connect to this MySQL server")
It has taken my ip '192.168.56.101' as '192.168.56.1'? Also I tried this:
mysql -u nilani -p pass -h 192.168.56.101
It also giving the same kind of error,
ERROR 1130 (HY000): Host '192.168.56.1' is not allowed to connect to this MySQL serve
Why it cannot identify my ip correctly?