This is a “known” issue and I read through several threads including the docs but I can’t solve it.
I first met the Access denied for user 'xwiki'@'%' to database 'testsubwiki'
when trying to create a sub wiki. Everything else was working nicely before. So I found in the docs this page: https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationMySQL/ which shows how to grant access.
I did all this in our database and finally I was able to create sub wikis.
Today I was presented a white page from the XWiki
service and found out that around 4am this morning XWiki
crashed with a Java Heap Memory error which turned out to be caused by a huge log-spam saying
km3net-wiki_web.1.5g1xoj6qwcnwmg3ebbb6928mv@pi1085 | Caused by: java.sql.SQLException: Access denied for user 'xwiki'@'10.0.13.46' (using password: YES)
I don’t understand how this is possible, since to my knowledge, the user xwiki
has all privileges, no matter on from which host it is operating (we are running in a swarm, so the host may change any time):
mysql> SHOW GRANTS FOR xwiki;
+--------------------------------------------------+
| Grants for xwiki@% |
+--------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xwiki'@'%' |
| GRANT ALL PRIVILEGES ON `xwiki`.* TO 'xwiki'@'%' |
| GRANT ALL PRIVILEGES ON `%`.* TO 'xwiki'@'%' |
+--------------------------------------------------+
3 rows in set (0.00 sec)
Any ideas?