python manage.py migrate 에러 django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

홍태경·2021년 4월 1일
0

django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

prodect 에 settings.py 에 있는 데이터베이스 비밀번호랑 일치 않는 경우가 많다

나이 mysql 비번은 ubuntu 이다

DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'exercise',
'USER': 'root',
'PASSWORD': 'pass1423',
'HOST': 'localhost',
'PORT': '3306',
}
}

DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django',
'USER': 'root',
'PASSWORD': 'ubuntu',
'HOST': 'localhost',
'PORT': '3306',
}
}

(product) ubuntu@ubuntu:~/dev/westartbucks$ python manage.py makemigrations products
Migrations for 'products':
products/migrations/0001_initial.py
- Create model Category
- Create model Menu
- Create model Product
- Add field menu to category

(product) ubuntu@ubuntu:~/dev/westartbucks$ python manage.py migrate products
Operations to perform:
Apply all migrations: products
Running migrations:
Applying products.0001_initial... OK

python manage.py runserver 8080
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 3 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
April 01, 2021 - 16:34:25
Django version 3.1.7, using settings 'westartbucks.settings'
Starting development server at http://127.0.0.1:8080/
Quit the server with CONTROL-C.

profile
나의 에고를 인정하고 사랑하자

0개의 댓글