I have a Flask web app it works fine with PostgreSQL but when I tried to connect it with MySQL database and try to run the migrations, it get me this error:
The error
Here is the SQLALCHEMY_DATABASE_URI that I am using:
mysql+pymysql://user:[email protected]:3306/database
and here is the way I am register the SQL-Alchemy in my app:
from flask_sqlalchemy import SQLAlchemy
application=Flask(__name__)
db = SQLAlchemy()
db.init_app(application)
Also here is the version of the dependencies:
sqlalchemy = 1.4.36
flask-sqlalchemy = 3.0.5
pymysql = 1.0.2
New contributor
Hasan Bilal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.