access denied for user

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        #'ENGINE': 'mysql.connector.django',
        'NAME': 'ecommercedb',
        'USERNAME': 'root',
        'PASSWORD': 'root',
        'HOST': 'localhost',
        'PORT':3306, 
    }
}


then u will get error

ie.,

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


solution :
=====


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

No comments:

Post a Comment