If you restore the
bitnami_moodle database from the previous server into the
bitnami_moodle database in the new server, you should be able to login into the Moodle website with your old credentials. I did it myself and I didn't have any issue. These are the steps I did:
- Launch a fresh new Bitnami Moodle instance in Google Cloud using the Bitnami Launchpad
- Login into it with the credentials provided in the Launchpad (for example
appPasswordGCP) and did basic modifications (website name, shortname, etc).
- SSH connect to that instance and create a backup of the
bitnami_moodle database only using the database credentials present in the
/opt/bitnami/apps/moodle/htdocs/config.php file (let's say,
mysqldump -u bn_moodle -p bitnami_moodle > backup.sql
# Answer password1 when prompted
- Start another fresh new Bitnami Moodle instance in AWS using the Bitnami Launchpad.
- Move the
backup.sql file from the GCP instance to the AWS one.
- SSH connect to the AWS instance and restore the
backup.sql into the
bitnami_moodle database using the credentials present in the
config.php file of this instance (suppose they are
mysql -u bn_moodle -p -D bitnami_moodle < backup.sql
# Answer password2 when prompted
- Restart services just in case (although it shouldn't be needed):
sudo /opt/bitnami/ctlscript.sh restart
- Navigate to the AWS instance IP to see the Moodle website and log into it with the credentials from the Bitnami Google Launchpad for the Moodle instance (as shown at the beginning,
The changes I did in the GCP instance are replicated in the AWS instance and I'm able to login with the credentials from the old server (the one in Google).
I hope this clarifies the migration process. Could you please try applying my guide in a new instance and check if you are able to login with your old credentials? Note I didn't need to manually modify the database at all, but to backup and restore the values from the old server.
For the rest of the questions in your latest post, I'm not sure if modifying the application database in that way is the correct way to do it, I recommend you to ask this question in the official Moodle forums as they can help you better than we can with this specific question related to their application