Uploaded image for project: 'XWiki Docker images'
  1. XWiki Docker images
  2. XDOCKER-118

Mysql Access Denied Error for Subwikis (can't create subwiki)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Unknown
    • N/A

    Description

      Hello, we installed 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 ON xwiki.* 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?

      Attachments

        Activity

          People

            vmassol Vincent Massol
            Lange Carsten Sievers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: