I am connecting MySQL - 8.0 with Netbean and get error: Unable to load authentication plugin 'caching_sha2_password'. Any solution for this ?
-
nobody here can guess your code, please post it in your question – DaFois May 29 '18 at 09:14
-
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 May 30 '18 at 01:56
-
1Possible duplicate of [How to resolve Unable to load authentication plugin 'caching\_sha2\_password' issue](https://stackoverflow.com/questions/50387952/how-to-resolve-unable-to-load-authentication-plugin-caching-sha2-password-issu) – Mark Rotteveel Nov 29 '18 at 16:28
-
For all looking here for answers the first one with ALTER USER worked for me, it's here https://stackoverflow.com/a/50209363/3140614 – Alcides Apr 26 '20 at 02:53
3 Answers
You should use MySQL Connector/J 8.0.9 or higher.
For Windows 7:
- Create a new driver new driver creation
- 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
- Create a new connection using new driver new connection creation
- 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

- 21
- 4
-
Your MySql server version and the Driver version should be same. It works for me on a maven project. – Milinda Arambawela Sep 24 '18 at 06:17
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

- 2,422
- 7
- 33
- 40

- 1,167
- 14
- 22
-
my my.ini file already has this setting. What else could be the problem though?. – iamjoshua Apr 22 '19 at 04:09
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.

- 123
- 2
- 9