How to Reset WordPress Password via MySQL Command Line!

For those of you wondering how to reset your WordPress admin password via MySQL command line, here’s how to do it:

Enter your MySQL command line with something like:

mysql -uroot -p

Then enter your password.

Once inside the MySQL command line do:

show databases;

and then find your database for the WordPress blog that you want to change password.

use mydatabase;

where mydatabase should be “your” database.

Then do:

update wp_users set user_pass =MD5(’typenewpasswordhere’) where id=1;

to change the admin password.

That’s it!

You can also do:

SELECT ID, user_login, user_pass FROM wp_users;

to list current users.

Share

Recommended MySQL



This entry was posted in MySQL, Web Server Hacks, Wordpress Hacks and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Related News and Resources

    None Found