How to reset Admin password on Moodle October 21, 2011Posted 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 .