Home/Server & Website Managed Operations/Recover Website Admin and User Passwords via phpMyAdmin
Server & Website Managed Operations

Recover Website Admin and User Passwords via phpMyAdmin

A hacked website or forgetting the admin password after a long period of inactivity can significantly impact website operations. This article explains how to recover forgotten or lost admin passwords by modifying the database. This tutorial is applicable to most open-source programs such as WordPress, Discuz, ThinkPHP, ECShop, etc.

First, we need a database management tool, which can be the one provided by the server or other third-party management tools (such as phpMyAdmin).

Modify Password

This article uses phpMyAdmin as an example. Typically, website user databases are named in the format “prefix_user”; for example, the default for WordPress is wp_user.

1. After entering phpMyAdmin, go to the website’s database on the left side and search for tables containing “user”.

phpmyadmin2. Click to enter the user database, where you will see the following image.

user3. As you can see, ‘name’ represents the username, and ‘pass’ contains the password encrypted using the “md5” function. Select the user whose password you want to modify and click “Edit”.

bianji4. We need to modify the password in plain text mode, so change the option for the pass field to “md5”, then directly input the new password.

new5. Click Execute. Once the modification is successful, the new password takes effect.

Summary

The principle above can also be accomplished with a simple command. This is suitable for Linux servers that do not have graphical management tools.

UPDATE  `topluscl(database_name)`.`user(table_name)` SET  `pass(password_field_name)` = MD5(encryption_mode)(  'new_password' ) WHERE  `user`.`uid` =1;
FREE CHECKUP

Free server checkup

We will send a problem checklist and remediation advice within one business day — no obligation to engage.

135 410 16684
Weekdays Mon – Fri 10:00 – 22:00 (UTC+8) · 7×24 emergency response
Call now
CONTACT

Contact Us

How can we help?

* Required