I'm getting error
Cannot establish a connection to jdbc:mysql://localhost:3306/world?zeroDateTimeBehavior=convertToNull using com.mysql.jdbc.Driver (Unable to load authentication plugin 'caching_sha2_password'.)
in netbean established the connection.
caching_sha2_password supports connections over secure transport. If you follow the RSA configuration procedure given later in this section, it also supports encrypted password exchange using RSA over unencrypted connections.
The mysql_native_password authentication plugin is the default authentication plugin that will be used for an account created when no authentication plugin is explicitly mentioned and old_passwords=0 is set.
The newer versions of MySQL default to caching_sha2_password. If you want to disable it then follow below steps
eg
mysql -u YOUR_ROOT_USER_NAME -p YOUR_ROOT_USER_PASSWORD
YOUR_ROOT_USER_NAME
and YOUR_ROOT_USER_PASSWORD
ALTER USER 'YOUR_ROOT_USER_NAME'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOUR_ROOT_USER_PASSWORD'
;
You will no longer get any 'caching_sha2_password
' exception while connecting for any client after this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With