I do this:

python manage.py syncdb --settings=settings_real

But I get this:

  (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.

    '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
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 ♦♦
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



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:


question asked: 01 Nov '10, 13:29

question was seen: 8,891 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