0
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> 
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="url" value="jdbc:mysql://localhost:3306/abc" />
        <property name="username" value="root" />
        <property name="password" value="root" />
</bean>

I have updated MySQL Connector/J to 8.0.14 but still getting the same error. Thanks in advance.

BSinha
  • 1
  • 1

2 Answers2

0

Try the below command. It might solve.

sample username / password => student / pass123

ALTER USER 'student'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass123';

How to resolve Unable to load authentication plugin 'caching_sha2_password' issue(SO)

If above doesn't work try to use MYSQL driver which supports MYSQL 8.

MySQL and Java Versions They Support

Pallamolla Sai
  • 2,337
  • 1
  • 13
  • 14
  • After using it, I am now getting "java.math.BigInteger cannot be cast to java.lang.Long" error which requires to downgrade MySQL . – BSinha Jan 30 '19 at 07:47
  • The problem is bcz of mysql and mysql driver versions. Please update both versions properly. Try to search mysql driver version for u r present mysql version. – Pallamolla Sai Jan 30 '19 at 08:48
0

Installed mysql 5.5 version and it worked fine with that. Thanks for your help.

BSinha
  • 1
  • 1