It’s pretty simple. You just execute the following query:
UPDATE
wp_users
SET user_pass
= MD5('PASSWORD_HERE') WHERE user_login
='USERNAME_HERE';
You could also go:
UPDATE
wp_users
SET user_pass
= MD5('PASSWORD_HERE') WHERE ID
='ID_HERE';
Or:
UPDATE
wp_users
SET user_pass
= MD5('PASSWORD_HERE') WHERE user_email
='EMAIL_HERE';
Etc., you get the idea.
Whatever field you use as your identifier, make sure the values are unique. There are plugins out there that allow the same email to be used for multiple accounts, so watch out for that last one. ‘ID’ or ‘user_login’ are safest.