Acquiring admin perms via the db
If you locked yourself out or just want to give another account admin permissions without using the permission editor in moonlight, you can use the steps in the following guide:
Before you start
Before you start, make sure you have a shell session as root and moonlight installed successfully
Using the db to set admin permissions
Describe what the user will learn and accomplish in the first part, then write a step-by-step procedure but on a real-world example.
First, you need to find out your database root password, you can do this by executing:
docker inspect moonlight_db | grep ROOT_PASSWORDThe result should be smth like this:
"MYSQL_ROOT_PASSWORD=yOuRFaNcYRoOtPaSwOrD"After that you want to log in to your database by executing:
docker exec -it moonlight_db mysql -u root -pIt will ask you for your password, enter the password you got from the step above
Then change the database to the database moonlight is using with:
USE moonlight;And for the final step, execute the following command replacing the username "testyowo" with the username of the account:
UPDATE Users SET Permissions = 9999 WHERE Username = "testyowo";Then exit with:
exit;Refresh the page and you should have full permissions