Bloggers: have you ever forgotten the password for one of your WordPress blogs? Or attempted to take over or maintain a blog setup by someone else who doesn’t know the admin password? This is your lucky day!
Assuming you have access to the database containing the WordPress blog’s data, resetting the password is easy. Assuming that the blog is using the default “wp_” table prefix, the user account is named “admin,” and the new password is being reset to “password”:
UPDATE wp_users SET user_pass = MD5("password") WHERE user_login = "admin";