[Django]-How to set django database settings

4👍

Its django.db.backends.mysql not just mysql

DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'database',                      
    'USER': 'root',
    'PASSWORD': 'passwd',
    'HOST': 'localhost',                      
    'PORT': '',
    }
}
👤leet

0👍

What you need to use is the backend module connection

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'yourdatabase',
    'USER': 'yourusername',
    'PASSWORD': 'yourpassword',
    'HOST': 'localhost',                      
    'PORT': '',
}
👤Carlos

Leave a comment