Skip to main content

MySQL 8: Public Key Retrieval is not allowed

After upgrading to MySQL 8, you may encounter the following error on startup:

Error
liquibase.exception.JDBCException: java.sql.SQLException:
Cannot create PoolableConnectionFactory (Public Key Retrieval is not allowed)
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Public Key Retrieval is not allowed

To remedy this:

  1. Stop Cascade CMS
  2. Edit your tomcat/conf/context.xml file and add allowPublicKeyRetrieval=true to your url parameter. Example:
XML
url="jdbc:mysql://localhost:3306/cascade?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true"
  1. Start Cascade CMS