Django uses sqlite as the default database. In this post, I’ll explain how to configure Django settings to connect with MySQL Database
Prerequisite
- Install Django
- Install MySQL
- Install mysqlclient
Configure settings.py file
In settings.py file under the project folder, change the DATABASES configuration.
DATABASES = { |
Create Initial Migrations
Migrate initial django tables to the database, run
python manager.py makemigrations |