Forums

SQL Connector Not Working

In my error log, I'm seeing a lot of the following error:

sqlalchemy.exc.OperationalError: (mysql.connector.errors.OperationalError) MySQL Connection not available.

I'm using Flask and Flask-sqlalchemy - why isn't this working??

Admins, you can take a look at my code as well.

Additionally, when I try to run 'flask db migrate' through Bash, I get another error:

sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1044 (42000): Access denied for user 'eabsenteeproject'@'%' to database 'eabsenteeproject'

It looks like you have the wrong database name in your connection string; your databases will have names like eabsenteeproject$default. You can see the names of the databases on the "MySQL" tab of the "Databases" page.