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
16126
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!

link

answered 01 Nov '10, 15:06

seanf's gravatar image

seanf ♦♦
8.0k1726
accept rate: 39%

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

Tags:

×742
×140
×71
×7

Asked: 01 Nov '10, 13:29

Seen: 5,192 times

Last updated: 01 Nov '10, 15:06

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited