It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

MySQL Public Key Retrieval is not allowed

My db server is mysql 8.0.11 and driver version 5.1.46. 

When ssl is enabled, and tries to connect to the database, confluence setup reports the following. 

Problem connecting to your database

SQLState - S1000
java.sql.SQLException: Illegal operation on empty result set.


But if "skip_ssl" is written to my.cnf and restarted mysql, then it shows the following error message.


Problem connecting to your database

SQLState - 08001
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed

Below is the output of logs/catalina.out

20-Apr-2018 14:35:35.680 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 6392 ms
Fri Apr 20 14:37:39 SGT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.


I also tried with the following connection string to disable verification and ssl




3 answers

1 accepted

3 votes
Answer accepted

For prosperity purposes, this has been solved by downgrading mysql 8.0 to mysql 5.7.22. Confluence documentation should state that it is not compatible with mysql 8.0.

Hi Thanks for your answer. I had have same problem so the solution that's worked for me it's by deleting useSSL= false at all. 

Maybe because i dont ssl file at all in my computer !!

Like # people like this

i am suing DBeaver for database connection. where should i enable this ?

We probably can't tell you - this is a place for Atlassian people, only a few of us might have experience with Dbeaver.



To change the settings on Dbeaver:

1) Right click your connection, choose "Edit Connection"

2) On the "Connection settings" screen (main screen) click on "Edit Driver Settings"


2019-04-09 16_36_09 - Screenshot.png

3) Click on "Connection properties"

4) Right click the "user properties" area and choose "Add new property"

5) Add two properties: "useSSL" and "allowPublicKeyRetrieval"

6) Set their values to  "false" and "true" by double clicking on the "value" column

2019-04-09 16_36_22 - Screenshot.png

Save and re-test the connection. Hopefully it should work!

Like # people like this

This worked for me, thanks.

Great work @Andre Tzermias , it worked great for me.

Obrigado @Andre Tzermias , funcionou perfeitamente para mim.

It works! Thanks a lot :)

That worked for me Thank You

pgavilan I'm New Here Mar 27, 2020



use this 

This worked for me, thanks.

Hola que tal, a mi me a funcionado tu configuración para mi pool de conexiones, en Mysql 8.0 Corriendo en Glassfish 5 :D
Gracias, Saludos.

Hi, this my configuration,  i worked in Mysql 0.8 with Glassfish 5 Server, Thanks :D



I think the issue is because you have followed the MySQL installation wizard and you have setup the "Use Strong password encription" option what now comes by default rather "Legacy authentication". If you are on Windows, you can execute the installer, click on reconfigure , follow the wizard and switch to Legacy.

Another solution is to fight with SSL Authentication ( not trivial ); below some url:

Also be sure you are using the latest driver for working with MySQL 8. If you at the end disable SSL, remove from your query connection the "verifyServerCertificate=false&useSSL=false" or you will get another errors ( yes it's a jigsaw ).

This worked. Thanks so much!.. 

If you change the password encryption from "Use Strong password encryption" to "Use legacy password encryption" to be compatible with MySQL 5.x connectors this will be solved.

On Mac, go to System Preferences -> MySQL -> Initialize Database to change this setting. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

345 views 11 11
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you