Title: change admin access
Last modified: March 30, 2021

---

# change admin access

 *  [individuum92](https://wordpress.org/support/users/individuum92/)
 * (@individuum92)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/)
 * Hi guys,
 * how can I change the admin login via mysql cli?
 * I already found the command to list all wp-users. For this I use:
 * select * from wp_users;
 * Unfortunately, the following command doesn’t work for me to change the password:
   
   UPDATE wp_users SET user_pass=MD5(‘NewPassword’) where id=3;
 * Query is OK but the wp-login (website/wp-login.php) doesn’t work.
    How can I 
   change the password?
 * Thanks a lot!

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14254379)
 * Hi, [@individuum92](https://wordpress.org/support/users/individuum92/)
 * This article lists seven ways to reset your website’s password. Any one of them
   will work and do the job.
 * > [Resetting Your Password](https://wordpress.org/support/article/resetting-your-password/)
 * The one describing the MySQL method is [this one](https://wordpress.org/support/article/resetting-your-password/#through-mysql-command-line)
 * Hope this helps,
    Kind regards!
    -  This reply was modified 5 years, 2 months ago by [Vlad](https://wordpress.org/support/users/vladytimy/).
      Reason: updated link
 *  Thread Starter [individuum92](https://wordpress.org/support/users/individuum92/)
 * (@individuum92)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257411)
 * Hi [@vladytimy](https://wordpress.org/support/users/vladytimy/)
 * Thank you very much for your answer. I tried it but it doesn’t work.
    Short summary:
 * – select * from wp_users;
    Result: Showed the 3 WP users. So far so good. – Placed
   my password into the hash generator and generated hash Result: Hash generated–
   UPDATE wp_users SET user_pass=MD5(‘HERE-MY-HASH’) where id=3; Result: Rows matched:
   1 Changed: 1 Warnings: 0
 * After that, I verified that the user_pass row was be changed: yes.
    Unfortunately,
   neither the hashed login nor the clear text password login works.
 * Any idea?
    Many thanks!
    -  This reply was modified 5 years, 2 months ago by [individuum92](https://wordpress.org/support/users/individuum92/).
 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257427)
 * >  `UPDATE wp_users SET user_pass=MD5(‘HERE-MY-HASH’) where id=3;`
 * Wouldn’t this MD5 an already hashed password? It seems like a double hashing 
   to me.
 * Forget the MD5 in the query and use `user_pass="HERE-MY-HASH"` instead OR don’t
   hash your password before and use `user_pass=MD5('my-plain-text-password')`
 * Hope this makes sense.
 *  Thread Starter [individuum92](https://wordpress.org/support/users/individuum92/)
 * (@individuum92)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257480)
 * Both solutions don’t work.
    Needs any service to be restart after passwort changing?
   I dont think so …?
 * WP-Login says that the given password for the user in invalid.
 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257513)
 * That’s strange. Is it mandatory to happen via MySQL? The initial article lists
   many other ways. But I guess you need this for an automatization process. I’ll
   test the method myself again and let you know if it works for me.
 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257593)
 * It works as expected on my tests. By any chance do you have multiple databases
   for different WordPress sites? You might select a different database? Just thinking
   what can be wrong.
 *  Thread Starter [individuum92](https://wordpress.org/support/users/individuum92/)
 * (@individuum92)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14257895)
 * I am using the MariDB. But I think thats not the problem here, am I right?
    I
   have double checked the databases. Everything is fine.
 * I have no idea what happen here. I am not sure if it is indeed a WP issue or 
   if I am be the issue ^^
 *  Thread Starter [individuum92](https://wordpress.org/support/users/individuum92/)
 * (@individuum92)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14276827)
 * Any idea here?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘change admin access’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [individuum92](https://wordpress.org/support/users/individuum92/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/change-admin-access/#post-14276827)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
