Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client

This error occurs because you are using MySQL Connector/J 5.1.45 or earlier. MySQL 8 introduced a new authentication mechanism (caching_sha2_password) that is not supported in those versions of the driver.

You will need to upgrade to MySQL Connector/J 5.1.46 or higher. The latest version of the MySQL Connector/J driver at time of writing is 8.0.15. You can download it from https://dev.mysql.com/downloads/connector/j/ or specify the right version in Maven/Gradle, etc.

Tags:

Mysql

Java

Jdbc