diff --git a/docs/install/databases.md b/docs/install/databases.md index 0c7f7d3f..67bdac3e 100644 --- a/docs/install/databases.md +++ b/docs/install/databases.md @@ -68,7 +68,7 @@ services: ## Binary logging and trigger privileges -RomM's migrations create triggers on the `roms` table. MariaDB and MySQL refuse trigger DDL when binary logging is enabled and the connecting user lacks `SUPER`, so the container aborts during startup with: +RomM's migrations create triggers on the `roms` table. MariaDB refuses trigger DDL when binary logging is enabled and the connecting user lacks `SUPER`, so the container aborts during startup with: ```text sqlalchemy.exc.OperationalError: (mariadb.OperationalError) You do not have the SUPER @@ -77,7 +77,7 @@ log_bin_trust_function_creators variable) ERROR: [RomM][init] Failed to run database migrations ``` -This mainly affects external or managed database servers, because binary logging is on by default on MySQL 8 and is commonly enabled on hardened or replicated MariaDB instances. The `mariadb:11` container from the reference Compose is not affected out of the box. +This mainly affects external or managed database servers, where binary logging is commonly enabled on hardened or replicated instances. The `mariadb:11` container from the reference Compose is not affected out of the box, and neither is MySQL 8.0.22 or newer, which no longer requires `SUPER` for trigger DDL. Both fixes below have to be applied by an admin or root database user rather than the RomM user. The quickest one sets the global flag, though it is lost when the database restarts: @@ -92,11 +92,10 @@ To make it survive a restart, add it under `[mysqld]` in the server's option fil log_bin_trust_function_creators = 1 ``` -Alternatively, grant the privilege to the RomM user itself: +Alternatively, grant `SUPER` to the RomM user itself: ```sql -GRANT BINLOG ADMIN ON *.* TO 'romm-user'@'%'; -- MariaDB 10.5+ -GRANT SUPER ON *.* TO 'romm-user'@'%'; -- older MariaDB, or MySQL +GRANT SUPER ON *.* TO 'romm-user'@'%'; ``` Restart RomM once the change is in place. A migration that failed this way is safe to re-run, so it picks up from wherever it stopped and completes.