How to recover drupal password in localhost? I have a complete Drupal website on localhost. I forgot the password and username for my account. I found the username in the database, but the password is hashed.

I can't send emails from localhost, so recovering the password using the email is not possible.

How can I recover the password?
You can update the password via mysql. You can run the following query in mysql to update password. The given hashed value is the hashed value of password: NewPassword

UPDATE users SET pass = '$S$DRSUIz9NFfxOXKPveQ00UTGMzsJe62LjYvVHfYJ8I8wuy4zRqVBK' WHERE uid = 1;


For detailed instructions go through these article Resetting the administrator password with sql-query (Drupal 7)