using mysql-python only connects to my router, not

2019-06-05 03:58发布

using python with module: MySQLdb I attempt to connect to a remote mysql server...

conn = mdb.connect('mysql.remotehost.com', 'username', 'password', 'database')

rather than try and make the connection to mysql.remotehost.com I get this error:

_mysql_exceptions.OperationalError: (1045, "Access denied for user 'username'@'xx.x.xxx.xxx' (using password: YES)")

where the xx.x.xxx.xxx is the ip address of my modem/router. Why does this happen? How can I get around it to actually access my remote mysql host?

1条回答
SAY GOODBYE
2楼-- · 2019-06-05 04:15

Looks like you don't have permission to access MySQL from host xx.x.xxx.xxx. You need to grant access to the user.

查看更多
登录 后发表回答