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

2

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
If your database isn't mysql change ENGINE

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'myproject',
        'USER': 'root',
        'PASSWORD': 'rootpassword',
        'HOST': 'localhost',
        'PORT': '',
    }
}
Posted by: Guest on November-21-2020
0

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

mysql> grant all privileges on *.* to root@localhost identified by 'password' with grant option;
Posted by: Guest on April-26-2021

Code answers related to "django.db.utils.OperationalError: (1045, "Access denied for user 'ODBC'@'localhost' (using password: NO)")"

Python Answers by Framework

Browse Popular Code Answers by Language