The password for an admin login in a moodle platform is lost.
I have access to the phpMyAdmin.
I went to the mdl_user table and there I can see or edit this table.
How should I proceed? Can I change the admin encripted password and secret key to a known password or is it simpler to just add an admin user?
How would that be?
Open up Moodle's config.php file, find the line where $CFG->passwordsaltmain is defined, and copy it's value (it's a long string of random characters).
In PHPMyAdmin, run the following query, substituting values as appropriate:
UPDATE mdl_user SET password = MD5(CONCAT('<new password>', '<password salt copied from config>')) WHERE id = <id of admin user>