jump to navigation

How to reset Admin password on Moodle October 21, 2011

Posted by Tournas Dimitrios in Moodle.

This article is a short how-to- change Moodle’s administrator password with a simple Mysql query (phpMyadmin)  . This method is valid  for all versions of Moodle .

  • Login your server’s  administration panel
  • Enable the Database web-interface panel  ( usually phpMyadmin)
  • Select  Moodle’s  database , over 300 tables will  become visible on the user-interface .
  • The tabel that stores the registered user”s credential is : “mdl_user” . Though the prefix ” mdl_” depends on the configurations made during the installation of Moodle  .  To find out the prefix , open “config.php” in Moodle’s root directory and find this directive : $CFG->prefix    = ‘mdl_’;
  • Select the “user” table .
  • From the list of registered users select the user “admin” and go to “edit” mode .
  • Set a new password in the ” password” field and enable MD5 hashing on the function’s drop-down box .
  • Save your changes .


1. Vipin Kumar - February 11, 2012

thanks man…….it worked..you saved my day

2. Luc - April 17, 2012

And my day 😉

3. Samual - July 6, 2012

Thanks Buddy

4. Veysel - September 26, 2013

thanks tournasdimitrios1 you are the king 🙂

tournasdimitrios1 - September 26, 2013

You are welcome

5. owenmck (@OwenMcK) - April 17, 2014

great stuff, beautifully explained! thanking you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s