编程知识 cdmana.com

Exception when springboot integrates MYCAT: client_ PLUGIN_ AUTH is required

One 、 Based on the environment

SpringBoot 2.3.3.RELEASE , mysql-connector-java 8.0.21 ,mycat The installation version is 1.6

Two 、 Have a problem

SpringBoot Project access mycat after , The startup project reported an exception :CLIENT_PLUGIN_AUTH is required

3、 ... and 、 Question why

SpringBoot Direct connection mysql when ,MySQL The driver version uses 8.0.X Can support , But it's a direct link mycat ,mycat Currently, the database driver version is not supported too high , Still need to use 5.1.X edition

Four 、 Solution

If the database uses mysql5.7 , So the corresponding mysql-connector-java The version of should be selected as 5.1.X edition , For example, here we changed it to 5.1.47 edition , Restart the perfect solution .

        <dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.47</version>
		</dependency>

5、 ... and 、 matters needing attention

If the database is mysql8, Then refer to these configurations :mycat Connect mysql8 Precautions for

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

版权声明
本文为[The blank of writing memory]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224104023962x.html

Scroll to Top