This is resolved by the init.sql mechanism introduced in XDOCKER-118.
On MySQL/MariaDB each subwiki lives in its own database, and the xwiki DB user originally lacked the privilege to create one, hence Access denied for user 'xwiki'@'%' to database '<wiki>'. XDOCKER-118 added an init.sql (grant all privileges on *.* to xwiki@'%') mounted at /docker-entrypoint-initdb.d/init.sql, which the MySQL/MariaDB official images execute on first database initialization, giving the user the privileges needed to create subwiki databases. (Postgres is unaffected: subwikis there use schemas within a single database.)
Note: the grant only applies to freshly initialized DB volumes, since /docker-entrypoint-initdb.d scripts run only on first init. Pre-existing volumes need the manual GRANT.
Closing as a duplicate of XDOCKER-118.
Vincent Massol on 19/Jul/26 09:49
This is resolved by the {{init.sql}} mechanism introduced in XDOCKER\-118.
On MySQL/MariaDB each subwiki lives in its own database, and the {{xwiki}} DB user originally lacked the privilege to create one, hence {{Access denied for user 'xwiki'@'%' to database '<wiki>'}}. XDOCKER\-118 added an {{init.sql}} \({{grant all privileges on \*.\* to xwiki@'%'}}\) mounted at {{/docker\-entrypoint\-initdb.d/init.sql}}, which the MySQL/MariaDB official images execute on first database initialization, giving the user the privileges needed to create subwiki databases. \(Postgres is unaffected: subwikis there use schemas within a single database.\)
Note: the grant only applies to freshly initialized DB volumes, since {{/docker\-entrypoint\-initdb.d}} scripts run only on first init. Pre\-existing volumes need the manual GRANT.
Closing as a duplicate of XDOCKER\-118.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.