berikut ini macam cara settting database django
- MAMP Server
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'HOST': '/Applications/MAMP/tmp/mysql/mysql.sock',
'NAME': 'crm',
'USER': 'root',
'PASSWORD': 'password',
'PORT': '8888'
}
}2. MYSQL Server (XAMPP)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'issue',
'HOST': '127.0.0.1',
'USER': 'root',
'PASSWORD': 'password',
'PORT': '3306',
'OPTIONS': {'charset': 'utf8mb4'},
}
}3. Default