3
votes

I am connecting MySQL - 8.0 with Netbean and get error: Unable to load authentication plugin 'caching_sha2_password'. Any solution for this ?

3
nobody here can guess your code, please post it in your question - DaFois
not from my code, its appear when i try to connect mySQL server from netbean. I was edited my question with a picture, pls help me - huy nguyen
For all looking here for answers the first one with ALTER USER worked for me, it's here stackoverflow.com/a/50209363/3140614 - Alcides

3 Answers

2
votes

You should use MySQL Connector/J 8.0.9 or higher.

For Windows 7:

  1. Create a new driver new driver creation
  2. Select a new MySQL Connector/J 8.0.9 or higher choosing new driver If you didn't install it during MySQL setup, you should do it first
  3. Create a new connection using new driver new connection creation
  4. Check an information, enter the password, change a value of the "zeroDateTimeBehavior" param to "CONVERT_TO_NULL", test the connection check connection If you have a "time zone" error, you should configure your MySQL time zone first
0
votes

Try to find your my.ini (windows) or my.cnf (mac os) file and add the following line in order to change default authentication:

default_authentication_plugin=mysql_native_password 
0
votes

Do not do anything with your admin DB or user table. Here is a solution, first of all, if you have already any connection which is unable to connect, delete it. then download the drivers from this link https://jar-download.com/download-handling.php after downloading the drivers extract them and cut-paste them in the following directory. C:\Program Files\NetBeans 8.0.2\ide\modules\ext\ After doing this all, create a new connection but change the drivers with the above drivers. Now test the connection. It worked for me successfully and I hope it will work for you too.