Copied from a forum.
I’ve done it a number of times… just fire up phpMyAdmin – load up the MySql database for that website.
Go to wp_users table (or the first two letters, if you’re smart, will be different… ‘wp’ is the default)
ID #1 is the admin, you’ll see the Admin name (Which again, if you’re smart, will *NOT* be the default ‘admin’)
Now, see ‘user_pass’?
That’s the MD5 coded password.
Forget trying to hack it. What you’re going to do is replace it.
Google for any “MD5 Hash” generator – you’ll find plenty of them. Here is one that I used, http://www.md5hashgenerator.com/.
Enter your new password… for example: ‘password’
The MD5 Hash generator site will spit out:
5f4dcc3b5aa765d61d8327deb882cf99
I went to a completely different site, and ran another MD5 hash, and sure enough, it spits back:
5f4dcc3b5aa765d61d8327deb882cf99
So cut and paste -DON’T TRY TO ENTER IT BY HAND!
Checkmark the box to the left on user #1… then click the ‘change’ tab
Paste your new value under ‘user_pass’ value… (on the right…)
Now click ‘Go’.
Done… now simply go back to the site, and log in with your new password.