Notice: Google is retiring their OpenID 2.0 authentication service. If you are using Google OpenID as your primary means to authenticate on this forum, then please either:

I do this:

python manage.py syncdb --settings=settings_real

But I get this:

_mysql_exceptions.OperationalError:
  (1045, "Access denied for user 'my_username'@'localhost' (using password: YES)")

I have tried changing the password and made sure that the password is correct.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'my_database',
        'USER': 'my_username',
        'PASSWORD': 'my_password',
        'HOST': '',
        'PORT': '',
    }
}

I get the same problem when I try to connect to the database using the CLI application.

Any ideas?

UPDATE: For what it's worth, I just created a new database and connected with the generated password. Seems to work fine. I'd still like to know what's wrong with the old setup.

asked 01 Nov '10, 13:29

Deniz%20Dogan's gravatar image

Deniz Dogan
16136
accept rate: 0%

edited 01 Nov '10, 13:37


Your database user name is not the same as your account user name. Your database user name is the same as the name of your database. So, if your db name is "my_database", then you should use that as your database user name.

Hope that helps!

permanent link

answered 01 Nov '10, 15:06

seanf's gravatar image

seanf ♦♦
9.7k1928
accept rate: 38%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×797
×148
×76
×7

question asked: 01 Nov '10, 13:29

question was seen: 8,076 times

last updated: 01 Nov '10, 15:06

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited