Django MySQL 설치 및 설정

김회민·2022년 4월 18일
0

설치

[ Bash ]
> pip install mysqlclient

설정

# /mysite/settings.py

# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
    'default': {
        'ENGINE':   'django.db.backends.mysql',
        'NAME':     table_name,
        'USER':     user_id,
        'PASSWORD': user_pwd,
        'HOST':     ip,
        'PORT':     post
    }
}
profile
백엔드 개발자 지망생

0개의 댓글