Login not possible after moving osqa database to a new site

193 Views Asked by At

I moved my osqa site from one machine to another machine, so I moved my mysql database too. After I finished this, the whole site is placed at another place. When I open the new site page, all information is fine.

But when I try to log into the new site, using my username and password (registered in my old site), it can't. When I look in the database, all user information is right here, not lost..

I just copied /var/lib/mysql/osqa from one machine to another for database migration.

What could be the reason that login doesn't work?

1

There are 1 best solutions below

0
On

Might need more debug information, but I wonder if in moving the database, Django is no longer able to unencrypt the passwords. If this is the case, then running user.check_password("whatever") will return False. From the shell, run the following:

from forum.models import User
user = User.objects.get(username="foo")
user.check_password("bar")

If that gives you a "False" then you know that the password is no longer working. If you get "True", then report back and we'll try something else. Good luck.