ModuleNotFoundError: No module named ‘MySQLdb’

I have read that mysqldb is not supported by python3

And it looks like when you are trying to connect to your database you are using mysql db to connect to the database by default!

you need to change it by editing your DATABASE_URI configuration

But before you need to install the connector extension :

with this command :

pip install mysql-connector-python

And according to this documentation you can edit your DATABASE_URI and change the default connector like this :

DATABSE_URI='mysql+mysqlconnector://{user}:{password}@{server}/{database}'.format(user="your_user", password='password', server="localhost", database="dname")

I hope this will help…

Leave a Comment