Changing the Moodle admin password through PhpMyAdmin
The previous article in the Getting Started with Moodle course explained the process for resetting the Moodle username and password in the Moodle dashboard. In the event the Moodle dashboard is not accessible to do this, the password and username can be reset in the database through PhpMyAdmin.
Using PhpMyAdmin to reset the User Password/Username
- Log into phpMyAdmin cPanel hosting will have a database utility called PhpMyAdmin within the cpanel. If the Moodle is installed on a non cPanel hosting, contact the hosting company for information on how to edit your database on the server. For more information on loging into PhpMyAdmin, please see the article on "How do I manage a MySQL database in PHPMyAdmin in my control panel (cpanel)?".
- In PhpMyAdmin, find the table called mdl_user and select it. Since Moodle has many tables, the mdl_user table may be on the second page. Select the second page.
- Click the mdl_user table.
- After selecting the table, find the table row for the user that is being edited. Click the Edit link with the pencil icon.
- There will be a series or characters and numbers in the password field. This is an encrypted password so it cannot be viewed in the database. Replace the encrypted text with the new password for the login. Next, in the drop down menu to the left, select MD5 then click Go. This can also be done for the Email address and the Username. The Email and the Username do not need the MD5 hash.
Now that the basics of the Moodle set up is established, it is time to learn more about how to use Moodle. Please check the next article on How to edit the Front page settings in Moodle.
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
Getting Started with Moodle
|1.||Getting Started Guide: Moodle|
Installing and Logging in
|2.||Installing Moodle with Softaculous|
|3.||How to log into the Moodle Administrator Dashboard|
Resetting your Moodle Password
|4.||I forgot / How to reset Moodle 2.3 username or password|
|5.||How to change the Username and Password in Moodle|
|6.||Changing the Moodle admin password through PhpMyAdmin|
Front Page Settings
|7.||How to edit the Front page settings in Moodle|
|8.||Editing the summary on the Moodle Frontpage|
|9.||Inserting an iframe in the Moodle Frontpage|
|10.||Managing the Moodle question bank|
Backup & Restore
|11.||Creating a Backup of Moodle|
|12.||Restoring Moodle from a backup|
My Profile Settings
|13.||Editing the User profile in the My Profile Settings of Moodle|
|14.||Configuring notification methods for incoming messages in Moodle|
|15.||Installing a Language pack in Moodle|
2018-04-11 6:09 am
Just a quick note - you can make a different user an admin by editing the mdl_config record where name = "siteadmins" and add the user id of the new admin. For example where user id is 266 change the record name="siteadmins", value="2,3" and update value to "2,3,266"