Table of Contents
root@grand [~]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 932677 Server version: 5.5.42-cll MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
You can check the database name from the WordPress configuration file.
mysql> use user_images; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed ~
We need to select only the following details from “wp_users” table.
mysql> SELECT ID, user_login, user_pass FROM wp_users; +----+------------+------------------------------------+ | ID | user_login | user_pass | +----+------------+------------------------------------+ | 1 | admin | $P$BjUKUieEYT1B3TnkQHsv4Y8hfnSK5t. | +----+------------+------------------------------------+ 1 row in set (0.00 sec) mysql>
This WordPress has only one user “Admin”. The password displayed here isn’t real, it’s in MD5 encrypted format.
This is the point that we are looking for. As I mentioned, the password displayed is in MD5 format. In latest MySQL versions we can generate the password in MD5 format from the commandline itself. Please see the syntax:
mysql> UPDATE wp_users SET user_pass = MD5(‘WPEXPLORER’) WHERE ID=1 LIMIT 1;
In previous versions we have to enter the password in MD5 format.
Syntax to change the password
mysql> UPDATE wp_users SET user_pass = "61250b88abfe298f2df4821d081a3add" WHERE ID=1;
Here the user pass in MD5 format.
See the updated password:
mysql> SELECT ID, user_login, user_pass FROM wp_users; +----+------------+----------------------------------+ | ID | user_login | user_pass | +----+------------+----------------------------------+ | 1 | admin | 61250b88abfe298f2df4821d081a3add | +----+------------+----------------------------------+ 1 row in set (0.00 sec) mysql>
That’s it!! Now try to login with the new password.
Ah, the joys of building a website! Picture this: You're sitting there in your pajamas, coffee in hand, ready to…
Are you feeling like your website is running in slow motion? It can be frustrating when your online presence doesn't…
Are you ready to take your online store to the next level? Whether you're running a PrestaShop or OpenCart platform,…
Picture this: your website is like a fabulous party happening in the darkest corner of the internet, but nobody's showing…
Picture this: Your WordPress site is like that one friend who's always fashionably late to everything. You know, the one…