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.