Change WordPress password through a simple MySQL query

An easy way for changing your wordpress password if you have access to the MySQL database is to run this query.
UPDATE `wp_users` SET `user_pass`= MD5(‘password’) WHERE `user_login`=’username’;

Replace the ‘username’ with the username which password needs to be reset/changed and replace password with the new password.

Run the query and voila you now have your password reset, you should now be able to login.