One undisputed advantage of using phpMyAdmin as a database management and administration frontend is how easy it is to configure and implement user-privileged actions. One such action is resetting your admin password from its Graphical User Interface. Changing user passwords involves several easy steps. We will go through all of them together.
[ You might also like: How to Install and Use phpMyAdmin in Linux ]
You should have a dedicated database user for your MySQL/MariaDB server. This user should be privileged enough to have access to all your databases and database tables.
It is not advisable to use the root user to gain access to your phpMyAdmin dashboard. If you are familiar with the MySQL/MariaDB command-line, you can use its terminal environment to create an alternatively dedicated database user with a command sequence similar to the following.
$ mysql -u root -p MariaDB ([none])> CREATE USER 'linuxshelltips_star'@'localhost' IDENTIFIED BY 'Pa55word'; MariaDB ([none])> GRANT ALL PRIVILEGES ON *.* TO 'linuxshelltips_star'@'localhost' WITH GRANT OPTION;
Changing WordPress Admin Password Using phpMyAdmin
The first step is to trace the phpMyAdmin site from your web browser. Accessing phpMyAdmin from a web browser environment requires a user to adhere to the following URL syntax rule.
In my case, I am working from localhost and so I will access phpMyAdmin in the following manner.
From here, you should be able to comfortably log in to the phpMyAdmin dashboard.
On the left side of the phpMyAdmin environment, you should see a list of all the MySQL/MariaDB databases that can be manipulated by your privileged database administration powers.
Trace the database associated with your WordPress site and click on it to expand.
The above clickable action should reveal all the database tables associated with the main WordPress database. It is a common rule for WordPress to label or name its database tables with the prefix
On the above exposed WordPress database table list, trace the one with the naming convention “wp_users” and click on it. It is the WordPress database table that holds all site user’s credential information.
The above action should list different database users associated with WordPress’ wp_users database table. Take note of these users’ IDs. In the above screen capture, the two users’ ID entries are 1 and 3 respectively.
Gaze back at phpMyAdmin’s dashboard panel on the left. Trace the WordPress database table with the naming convention wp_usermeta and click on it. It should reveal some interesting information.
The wp_users ID should match with wp_usermeta user_id. Also, the wp_usermeta user_id values should be on the same row with wp_capabilities and
This reference match confirms that the wp_users’ users whose password we want to change are indeed admin users. If these wp_users ID to wp_usermeta user_id row values reference did not exist, we would only be changing the password of an ordinary WordPress user and not the one for an Admin user.
We can now go back to the wp_users WordPress table and fulfill the objective of this article.
Click Edit on the Admin user whose password you need to change. Under the ID table column, find user_pass and set the varchar(255) value to MD5, and then key in your new Admin user password value. Finally, click [Go].
The below screen capture confirms that the query execution was a success.
You should now be able to log in back to your WordPress site with the new password.
A good thing about using the phpMyAdmin dashboard to change Admin user-associated login credentials is that it is fast and flexible. You do not have to worry about typos unlike when executing queries on MySQL to change WordPress passwords.