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.
