first i went into phpmyadmin of my host and selected the moodle database and exported the full database to .sql file
next i used phpmyadmin on my PC (wamp server), created a database moodledb2 and imported the .sql (file created in the first step)
then i made the change in config.php to the new database
when i started to browse this on my pc, the front page looks fine..
but it does not allow me to login with the username and password that was created on the original installation (host).
i checked the users table content and the md5 hash is the same for the online one and my pc one.
can someone please help me..?
Re: After SQL import of full database, login failed
It would help a bit if you can say us what kind of error you are seeing,
If you get an invalid username and password error, then for sure it is something to do with the database record for that particular username.
Re: After SQL import of full database, login failed
Invalid login, please try again
The error is same for all the usernames
Hope that helps,
Mike
Re: After SQL import of full database, login failed
Re: After SQL import of full database, login failed
Hello all,
I also encounter the same problem when i was upgrading the my Test machine. after importing the MYSQL DB backup to the Test database, when i upgrade moodle to 1.9.7 and tried to login it was not allowing me to login as ADMIN. I also check from backend from DB to change the password, but it didn't worked (using mdl_user table).
At last i had to change the password with this help of emails. Clicked on forgot password and then it asked for username/email address and than it sent the password through emial.
If your ADMIN user has different email address you cna change it from mdl_user table and place your email address there and this way you can have the password sent to you.
I think it is an security feature for moodle 1.9.7.
Hope this help.
~Satyajit
Re: After SQL import of full database, login failed
Re: After SQL import of full database, login failed
You can do this, after everything is down and you are about to login to the Moodle Site, for example as Admin User:
1. Go to MYSQL or whatever DB.
2. Update the email address for the user "admin" in mdl_user table.
for example:
UPDATE mdl_user SET email = 'satyajit@r00t4u.com' where user = 'admin';
3. Now Your email address has been updated. Now you can go to the browser and click on forgot password.
4. It will ask for the username/email address and once you give that it will send you the temporary generated password through email.
Hope this help.
~Satyajit
$CFG->passwordsaltmain = "...."
in the old configuration file of old moodle server to new configuration file of new server.
I solved my problem. More about password salting: http://docs.moodle.org/eu/report/security/report_security_check_passwordsaltmain
--
Moodle 1.9.9+ (Build: 20100630)
thank you i am also have the problem with login
invalid login please try again
i changed to the old configuration its fine working thanks
Thanks planetoid h.
I had the same problem and was able to correct it in the config.php
by making use of your method to solve it.