java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2497)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2455)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1369)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3777)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3240)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2249)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2035)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(ConnectionFactory.java:68)
at org.mybatis.generator.config.Context.getConnection(Context.java:526)
at org.mybatis.generator.config.Context.introspectTables(Context.java:436)
at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222)
at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:133)
at com.imooc.mybatis.utils.GeneratorDisplay.generator(GeneratorDisplay.java:26)
at com.imooc.mybatis.utils.GeneratorDisplay.main(GeneratorDisplay.java:33)
Process finished with exit code 0
Pom.xml里修改:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<!--<version>5.1.41</version>-->
<version>8.2.0</version>
修改maven:
java.lang.RuntimeException: Exception getting JDBC Driver
修改版本后不报 了
开始报这个Establishing SSL connection without server's identity verification is not recommended
估计是要使用SSL