[SOLVED] MySQL communication problem - Public Key Retrieval is not allowed with HTTP 500

Hi, I had an issue today where my xwiki stopped working (famous XWiki is initializing (50%)) after I added a table into one of the pages (wiki only has few pages at this moment).
In the server log (HTTP status 500) first root cause was
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
Solution - I had to log in to mysql with xwiki user and restart the tomcat9 service.

Helped me, hope it will help someone else, didn’t see an issue like that described yet in reards to xwiki.

Turns out solution above is temporarily by it’s nature.
There was another case like mine and @tmortagne helped there a lot.

All you need to do is add allowPublicKeyRetrieval=true in your connection string in file hibernate.xfg.xml (/etc/xwiki/hibernate.xfg.xml - in my case)

It should look like this in my case.
jdbc:mysql://localhost/xwiki?useSSL=false&allowPublicKeyRetrieval=true

Link to original post.
https://forum.xwiki.org/t/error-message-11007-on-fresh-install-using-tomcat9-and-mysql/7127/7?u=nasdk

Note that this is the default in the coming 12.6 (and in 11.10.6).

Also fixed in the docker images with Loading...