Hello, I am currently trying to install an XWiki 10.1 (Standard Flavor) instance from the official xwiki:10-mysql-tomcat docker image using the provided docker-compose files. Adding Subwikis does not work out of the box:
The Wiki by default uses the “xwiki” MySQL user, which is (I assume) created during the installation process by using the MySQL root user (XWiki also knows the MySQL root password).
After setup, the xwiki MySQL user has the following grants:
±-------------------------------------------------+
| Grants for xwiki@% |
±-------------------------------------------------+
| GRANT USAGE ON . TO ‘xwiki’@’%’ |
| GRANT ALL PRIVILEGES ONxwiki
.* TO ‘xwiki’@’%’ |
±-------------------------------------------------+
In a default MySQL installation, this new “xwiki” user seems to not be able to create new databases. This is however required for creating subwikis (on MySQL, Subwikis must exist in separate databases, as XWiki documentation suggests). Creating a new Wiki through the Wiki index therefore fails.
unsuccessfull solution attempts:
- Granting CREATE (or even ALL) permissions to the xwiki user does not help, as the user then might be able to create a database, but won’t be allowed to access it. According to this blog post, enabling a non-root user to create and populate databases would require updating the createdb stored procedure. This feels hacky…
- Creating the database for the new wiki beforehand and granting permissions to the xwiki MySQL user does not work. The Subwiki creation process complains that the database already exists.
A workaround I have found is to start xwiki with the MySQL root user.
Is there something wrong with my setup, or is there currently no clean way to create subwikis in my configuration?