Forums

Unable to connect to mysql db through flask

While trying to connect with the following credentials app.config['MYSQL_HOST'] = 'mod5r.mysql.pythonanywhere-services.com' app.config['MYSQL_USER'] = 'mod5r' app.config['MYSQL_PASSWORD'] = 'mod5r' app.config['MYSQL_DB'] = 'mod5r$investment'

while connecting cur = mysql.connection.cursor()

I am getting the following error: MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 'mod5r'@'10.0.0.32' (using password: YES)")

Are you sure that you are using right password? Are you able to open MySQL console for m"Databases" page on PythonAnywhere?