How do I change the admin password form PHPMyAdmin?

  • 1
    I don't understand this question. Some guesses what the question might be: (1) you want to change something in a form (as in your title). (2) you somewhere have a password for an admin, and you want to change it from "phpmyadmin" to "Drupal. (3) You wonder how you can use Drupal to change the Admin password to logon to PhpMyAdmin (4) you want to change some Drupal Admin password from within PhpMyAdmin. Or still something else? BTW: do you have Drush installed? Aug 9, 2016 at 14:04
  • get the query from here and run in phpmyadmin btobac.com/reset-drupal-admin-password-mysql-query-phpmyadmin Feb 6, 2020 at 12:08

4 Answers 4


if you have the drush installed in your system . You can use the below command :

drush user-password USERNAME --password="SOMEPASSWORD"

For more reference refer this


You can change with going to users table

1 Run query

`UPDATE users SET name='admin', pass='$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x' WHERE uid = 1;`
  1. change email address in users table getting the password reset link (only applicable for if password is foget ) checkout this link for more information

In phpmyadmin run this query.Then your username is "admin" and password is "admin".

   'UPDATE users SET name='admin', pass='$S$DUW/9/iT3a6vAzdFrjsXki9IHC.CjgW4yrsZlDTzMlKXdd5Wk.mb' WHERE uid = 1;'

By using drush you can do like this:

drush uli or drush uli uid

drush uli provides link like this for admin(by default)

http://default/user/reset/1/1470735542/FAG2Elp2J_eN4k6XMq_KleQmBTmQ1Uoitl0Vs86JvdA Replace default with your site URL.

Refer this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.