Last updated December 31, 2012. Created by jbrauer on January 10, 2006.
Edited by batigolix, rvanderh1, dkinzer, BassPlaya. Log in to edit this page.
There are several methods to recover the Drupal administrator ("user 1") password. The fastest way is using drush.
Request new password via e-mail
You can reset your password by requesting a new password at http://www.example.com?q=user/password.
Change password with a database query
Drupal 7
Update administrator password via sql-query in Drupal 7.
Drupal 6 and below
Execute the following query on the Drupal database where 'givememypasswordback' is your new password. You will need to log into your database using phpMyAdmin or another tool.
UPDATE users SET pass = MD5('givememypasswordback') WHERE uid=1;Recover password with Drush
Drush offers a number of methods to recover the administrator's password.
Generate login-link
Drush can generate a one-time login link.
drush uliReset password
drush upwd --password="givememypasswordback" admin(where "admin" is the user name)
Update password with query
drush sql-query "UPDATE users SET pass = MD5('givememypasswordback') WHERE uid =1;"