Pymysql cant connect Amazon RDS host, but same host is accessible through mysql workbench

巧了我就是萌 提交于 2019-12-10 10:50:34

问题


I am using pymysql to connect to Amazon RDS and it fails with :

 db = pymysql.connect(host=Host, user=User, password=Pswd, db=DBN, charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor,local_infile=True)
 File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, u"Access denied for user 'p_cs'@'xx.xx.xx.xx' (using password: YES)")

However If i try to connect to the same host with mysql workbench, I am able to! Any help on what can be the connectivity issue??

来源:https://stackoverflow.com/questions/42347191/pymysql-cant-connect-amazon-rds-host-but-same-host-is-accessible-through-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!