There are 3 updates, 2 comments.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-aafdf4aa-1e47-4b0b-9fce-40d1b49469d5 XDOCKER-73 Closed

Access denied when creating subwikis

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-2dba02ea-be38-4ca9-b55a-25c74ae141a4 Changes by Vincent Massol on 19/Jul/26 09:41
 
Assignee: Vincent Massol
Resolution: Duplicate
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-2dba02ea-be38-4ca9-b55a-25c74ae141a4 Vincent Massol on 19/Jul/26 09:40
 

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.

 
cid:jira-generated-image-avatar-2dba02ea-be38-4ca9-b55a-25c74ae141a4 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.