Forums resolving issues


I tried hosting my webpages on . I used the default mysql entries from pythonanywhere site.


# development
# 'default': {
#     'ENGINE': 'django.db.backends.sqlite3',
#     'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }

# ##  production
'default': {
        'ENGINE': 'django.db.backends.mysql',
        'HOST': '',
        'PORT':'' # 3306



when i am doing "python migrate" i am getting the following errors.

     File "/home/tuxfux/myenv/local/lib/python2.7/site-packages/MySQLdb/", line 86, in Connect
     return Connection(*args, **kwargs)
     File "/home/tuxfux/myenv/local/lib/python2.7/site-packages/MySQLdb/", line 204, in __init__
     super(Connection, self).__init__(*args, **kwargs2)
    django.db.utils.OperationalError: (1045, "Access denied for user 'tuxfux'@'' (using password: YES)")

On doing nslookup on i found out this is resolving to a different ip -

      (myenv) 02:48 ~/src $ nslookup
     Non-authoritative answer:        canonical name = users-mysql-5.machines.pythonanywhere- canonical name = canonical name = Name: Address:

On further changing my setting file DATABASE to the ip - its giving a syntax error.


File "/home/tuxfux/src/mysite/settings/", line 1, in <module> from .base import * File "/home/tuxfux/src/mysite/settings/", line 105 'HOST':, ^ SyntaxError: invalid syntax

can anyone please provide me some insite on this.

If that is your actual password then anyone on PythonAnywhere would be able to access your database. You should change you mysql password.

You would probably have to put the in quotes.

That sounds like there was some weird dns caching issue. I see that you signed up a long time ago- did you by any chance delete/recreate your mysql database recently? That perhaps moved your database to a new db server (which we do behind the scenes by flipping where your points to to a new IP). And then if your webapp was continuously running, then maybe it got was still remembering and using the old IP?