Reset admins password
From Meta
To reset admin´s password you should change the value of user_password field, in user´s table.
UPDATE user SET user_password = MD5(CONCAT(user_id, '-', MD5('somepass'))) WHERE user_name = 'someuser';
If you are using postgresql the command would look like this.
update mwuser SET user_password = MD5(text("user_id") || text('-') || MD5('somepass')) WHERE user_name = 'someuser';
An option that worked on Windows was: Open a command prompt CD to the maintenance directory enter this command:
php changePassword.php --user='username' --password='foo'
<where 'username' is the uid, and 'foo' is the new password>

