The older version of MYSQL connector/J is not compatible with MYSQL 8. To resolve this issue, upgrade to the latest version of MySQL connector/J i.e 8.0.11 or newer
To update the version of MySQL follow the steps below:
1. Download the new version of MySQL Connector/J from the link given below:
https://dev.mysql.com/downloads/connector/j/
2. Open the command prompt and Navigate to the directory where you downloaded the ZIP File:
3. Extract the ZIP file using a tool like '7-Zip' OR 'Winrar.’
4. Locate the old JAR file in your project’s classpath or dependency directory.
5. Remove the Old Version:
6. Copy the new JAR file to the appropriate directory
7. If using a build tool like Maven or Gradle, update your pom.xml or build.gradle as needed.
8. Use your build tool commands or IDE to rebuild and redeploy your project.