PDA

View Full Version : Forgot MediaWiki administrator password


ThunderPoit
2007-10-13, 17:54
Ok, so i did something stupid. I was playing around with mediawiki on my mac and i wanted to go and delete some of the articles i created, when i found i couldnt log in with what i thought was my administrator account. How can i find what my administrator's username was and how can i reset the password?

chucker
2007-10-13, 18:12
The user table in the database will contain the username and password.

http://www.mediawiki.org/wiki/User_table says:
user_password is a concatenated md5 hash of user_id, a hyphen (-), and md5 hash of current password.

Sounds fairly simple (almost too simple, really*) to generate that password yourself:
echo -n "thunderpoit-passwordgoeshere"|md5

*) What, no salting?

ThunderPoit
2007-10-13, 18:47
but its the username i dont know :(
and unfortunately, my MySQL skills arent to the level where i could go dig thru the database myself

chucker
2007-10-13, 18:49
So, get CocoaMySQL, YourSQL or a similar GUI program, connect to the MySQL server, and look through the user table. :)

ThunderPoit
2007-10-14, 00:30
I should probably take this as a great lesson and not install software at 2 am and then forget to write down my passwords, but i cant seem to remember my mysql login info. Is there any hope for me? or should i just kill everything and reinstall? how do i reinstall mysql?

*puts mysql for noobs on Things to Read list....

edit- Does mediawiki have the mysql connection info stored in a php file somewhere?

chucker
2007-10-14, 03:32
edit- Does mediawiki have the mysql connection info stored in a php file somewhere?

Yes, in LocalSettings.php, in the $wgDB* variables.

ThunderPoit
2007-10-14, 15:05
I would like to simply state that:
CHUCKER RULES!
Thanks for the help man, I'll try not to embarrass myself so much in the future.

btw, i could not get CocoaMySQL to work, it would not connect to my database no matter how i authenticated. phpmyadmin worked great tho.