How do I change a user's password?
Assuming that $wgPasswordSalt is set to true (the default), you can use the following SQL query:
UPDATE user SET user_password = MD5(CONCAT(user_id, '-', MD5('somepass'))) WHERE user_name = 'someuser';
Where obviously "somepass" is changed the password you want to set and "someuser" is changed to the user name as it is listed in the table "user".
Von http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_change_a_user.27s_password.3F