Recovering lost user (admin) password
UPDATE users SET pass = MD5('givememypasswordback') WHERE uid=1;
php ./scripts/password-hash.sh newpwd
The script will output a password hash that is valid for the site, something like:
Use it in a SQL query to set new passwd:
UPDATE users SET pass ='$S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML' WHERE uid = 1;
Reset using a PHP-file
No command-line access? You can reset the drupal password using a PHP-file as well, but keep in mind that this opens the potential to a huge security issue if not handled correctly.
Clear flood table
If you have reset password but still receive “Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked.” then you may delete the corresponding entry in the flood table.
This flood table records username and ip which has failed login attempts.