0

MySQL Connection error

While trying to connect to my mysql database in netbeans, I get the following error message:

Cannot establish a connection to jdbc:mysql://localhost:3306/mysql?zeroDateTimeBehavior=convertToNull using com.mysql.jdbc.Driver (Unable to load authentication plugin 'caching_sha2_password'.)

So I can't connect to the database.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
nandhu
  • 1
  • 3
  • Do you use a Macbook? –  Oct 02 '18 at 09:44
  • 1
    Can you provide whole error message with stack trace? – talex Oct 02 '18 at 09:55
  • Which version of MySQL Connector/J and which version of NetBeans are you using? – Mark Rotteveel Oct 02 '18 at 11:36
  • Possible duplicate of [How to resolve Unable to load authentication plugin 'caching_sha2_password' issue](https://stackoverflow.com/q/50387952/2985643), especially [this answer](https://stackoverflow.com/a/50433762/2985643) which links to [this information on authentication](https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html), which is relevant if you are using MySQL 8.0.4+. – skomisa Oct 03 '18 at 07:02
  • using Server version: 8.0.12 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle & mysql-connector-java-8.0.12.jar to connect – nandhu Oct 05 '18 at 11:29

0 Answers0