# Mediawiki - recover admin rights

DevFeed: [Mediawiki - recover admin rights](<https://devfeed.tech/articles/mediawiki-recover-admin-rights-27614.md>)

Original publisher: [Read original article](<https://gagor.pro/2014/03/mediawiki-recover-admin-rights/>)

Author: Tom

Published: 2014-03-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [MediaWiki](<https://devfeed.tech/topics/mediawiki.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [passwords](<https://devfeed.tech/topics/passwords.md>)

Tags: [concat](<https://devfeed.tech/tags/concat.md>), [database](<https://devfeed.tech/tags/database.md>), [mediawiki](<https://devfeed.tech/tags/mediawiki.md>), [password](<https://devfeed.tech/tags/password.md>), [permissions](<https://devfeed.tech/tags/permissions.md>), [sql](<https://devfeed.tech/tags/sql.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

A tutorial explains how to recover MediaWiki administrator access after losing admin credentials. It describes resetting an administrator password through a database SQL query and raising another user's permissions.

## Source excerpt

Let say you have MediaWiki installation but you lost admin credentials. If you have other account or if you could create one without any rights we're in home 😉 We have few options to do this. Reset admin password We have to connect to database and use this SQL: UPDATE `user` SET user_password = CONCAT( SUBSTRING(user_password, 1, 3), SUBSTRING(MD5(user_name), 1, 8), ':', MD5(CONCAT(SUBSTRING(MD5(user_name), 1, 8), '-', MD5('new password')))) WHERE user_name = 'Admin'; Just replace Admin with your username and new password with your password.