Now, Database A is just a copy of the database. While Database B happens to be a database inside a Moodle site, let’s call this site, old site.
Let's assume, we have been assigned the task to login into Database A and perform some testing. However, we do not have any credentials for this database. Luckily, both the databases have an admin account with the same username - admin.
To tackle this problem, here’s what we are going to do:
Import Database A into a fresh Moodle install, let’s call this Moodle site, new site
Access Database B and find the admin user and their encrypted password. Copy this encrypted password
Access Database B and find the admin user and replace the encrypted password with the password you got from Database A
Clear all browser cache and login with the credentials you used to login with the same admin credentials you used to login with in your old site.
Sorry to drag this out for so long, I really wanted to know whether someone has tried this out?