Working for a client who has documentation on a MediaWiki installation which was set up before we got there. Was able to create users for ourselves through the regular site, but certain things like deleting pages can only be done by sysops. None of our newly registered users are of course sysops and the only existing sysop user is from whoever installed the wiki to begin with.
Here’s how to promote a user to sysop the hackish way, directly in the database.
Find database details
- SSH into the system where MediaWiki is installed and find its location.
/var/www/html/foowikiin our case.
LocalSettings.phpand everything should be under the heading
## Database settings
- Connect with a mysql client.
mysql -h localhost -u wikiuser -p wikidb
- Find the user id.
SELECT user_id, CONVERT(user_name USING utf8) FROM `user`;
- Add user id to sysop (and bureaucrat) group.
INSERT INTO `user_groups` VALUES (uid, 'sysop'),(uid, 'bureaucrat');
The user should now be sysop, which can be double checked on the Special:ListUsers wiki page.