Hello! What version of Django are you running?
You may need to provide extra info such as host and port
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mydatabase', 'USER': 'mydatabaseuser', 'PASSWORD': 'mypassword', 'HOST': '127.0.0.1', 'PORT': '5432', } }
Hope it helps
[]'s
Daniel Germano Travieso
Engenharia da Computação Turma: 013
Unicamp
On Sun, May 27, 2018 at 8:24 AM, Coder Dude <coderdude1999@gmail.com> wrote:
This is the code in my settings.py :--import pymysql
pymysql.install_as_MySQLdb()DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'learn001',
'USER': 'test01',
'PASSWORD': 'test01', #Password is also test01
}
}Yet , it is throwing the following error :django.db.utils.OperationalError: (1045, "Access denied for user 'test01'@'localhost' (using password: NO)". I don't understand why it is trying to connect without a password.It works properly if I create a user with no password and then provide it's username.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bc025b3b- .58b6-450a-8d37-3fca71568e72% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABF8kZPSeDL3fy5p29cdrSD2dNe%3D0q8Q1P6ATbHXNtJzg1imxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment