I was testing how to do and restore a backup and lost access to the admin user. When I am in the login page, I input the email and password for the user, but I get “invalid username and password combination”.
My steps were:
1 - create a backup running “docker-compose exec -T --env MYSQL_PWD=dbpass db mysqldump dbname --add-drop-database --no-tablespaces -u dbuser > dump.sql” from the root directory of the database.
2 - stop the database from docker and create a copy of the whole database folder
3 - build the copy database by running “docker-compose up -d” in the root directory of the copy database
4 - Once the server was healthy, proceeded to restore the backup in the copy database by running “docker-compose exec -T --env MYSQL_PWD=dbpass db mysql dbname -u dbuser < dump.sql”
5 - From this point forward, I no longer have access to the admin user in the original database, but I know there is an admin user with the admin email because I can not create a new user using the admin email.
Is there a way to force the system and create a new admin user or give the access to an existing user?