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

You need to make changes in project settings.py. Provide USER and PASSWORD for your database

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

Check Your Database Username and Password. many time, we do typing mistake. it doesn't match from the database username and password so occur this error. I faced this error and trust me, it is my very bad experience.

Tags:

Mysql

Django