Manual:Resetting passwords

Direct database modification

 * Note: The salting method for passwords changed in 1.13 or 1.14. These commands will likely only work with older versions of MediaWiki.

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';

Alternate option
If you're able to easily find the e-mail address used with the account and update it, you can have MediaWiki send a 'forgot password' e-mail, which allows the software to change the password for you.

Maintanance script
Execute this script to change the password for username to foo php changePassword.php --user='username' --password='foo'

MediaWiki extension
An extension is available to reset passwords: Extension:Password Reset.