You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: name SUPER as the only grant that lifts the trigger denial
BINLOG ADMIN does not lift error 1419 on any MariaDB version, so the grant
this page recommended first leaves the reader exactly where they started.
Verified on 10.11.19, 11.3.2 and 11.8.9: only SUPER or the global flag works.
MySQL stopped requiring SUPER for trigger DDL in 8.0.22, so scope the section
to MariaDB rather than sending MySQL 8 readers after a privilege they hold no
need for. Verified on 8.0.46 and 8.4.11 with binary logging on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/install/databases.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ services:
68
68
69
69
## Binary logging and trigger privileges
70
70
71
-
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:
71
+
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:
72
72
73
73
```text
74
74
sqlalchemy.exc.OperationalError: (mariadb.OperationalError) You do not have the SUPER
ERROR: [RomM][init] Failed to run database migrations
78
78
```
79
79
80
-
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.
80
+
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.
81
81
82
82
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:
83
83
@@ -92,13 +92,14 @@ To make it survive a restart, add it under `[mysqld]` in the server's option fil
92
92
log_bin_trust_function_creators = 1
93
93
```
94
94
95
-
Alternatively, grant the privilege to the RomM user itself:
95
+
Alternatively, grant `SUPER` to the RomM user itself:
96
96
97
97
```sql
98
-
GRANT BINLOG ADMIN ON *.* TO 'romm-user'@'%'; -- MariaDB 10.5+
99
-
GRANT SUPER ON *.* TO 'romm-user'@'%'; -- older MariaDB, or MySQL
98
+
GRANT SUPER ON *.* TO 'romm-user'@'%';
100
99
```
101
100
101
+
`SUPER`is the only grant that lifts this check. The finer-grained privileges MariaDB split out of it in 10.5, `BINLOG ADMIN` included, leave the denial in place.
102
+
102
103
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.
0 commit comments