Manual:Resetting passwords

Direct database modification
To reset a password you should change the value of user_password field, in user's table.

1.13 and above
You should choose the salted or unsalted method depending on the value of $wgPasswordSalt in LocalSettings.php

MySQL unsalted:

MySQL salted (make sure both instances of "somesalt" are the same):

PostgreSQL unsalted:

PostgreSQL salted (make sure both instances of "somesalt" are the same):

1.12 and below
MySQL:

PostgreSQL:

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.