Updated troubleshooting (markdown)

2021-03-14 00:07:47 +11:00
parent 4911e18148
commit dad2010ad8
+24
@@ -10,3 +10,27 @@ Try again. There are timing issues between the different containers that I still
If you just upgraded the template, try checking if any changes to the sequelize models have occurred. If so, you'll have to go into the mariaDB container and alter the database directly.
## I accidentally removed all admin privileges, and now I can't login!
When there are 0 accounts with administrator privileges, the auth-server will try to create the default admin account (if details for it have been specified) and when it fails, it crashes. You'll have to mess with the system's database to fix it.
Run the following command on the same machine as the database container:
```
docker exec -it <database_container_name> bash
```
This will open a bash program inside the container. From here, you can access mariaDB and alter the database:
```
mysql -u root -p
```
Enter the root password, then run the following commands to restore the admin privileges:
```
USE auth;
UPDATE accounts SET privilege = 'administrator' WHERE username = 'admin';
```
Then just keep typing "exit" to exit the program. This assumes that you want to restore privileges to the "admin" account - you can of course grant it to whoever you need to.