mysql 8.0 java连接报错:Unknown system variable 'query_cache_size'
java连接mysql 8.0.11报错
java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:545)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)
at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1983)
at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1936)
at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
at com.mysql.cj.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:2831)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:2381)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1739)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1596)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:633)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:347)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:219)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
原因是mysql-connector-java的版本还是6.0.6,需要升级版本到8.0.11 ,这个报错就不存在了
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
mysql 8.0 java连接报错:Unknown system variable 'query_cache_size'的更多相关文章
- mysql 问题:Unknown system variable 'query_cache_size'
报错:Unknown system variable 'query_cache_size' mysql 的 java 驱动等级比较低,与mysql 数据库不匹配.
- maven+springmvc出现:java.sql.SQLException: Unknown system variable 'query_cache_size'
连接mysql时一直出现以下的错误: org.springframework.web.util.NestedServletException: Request processing failed; n ...
- Unknown system variable 'query_cache_size'
java连接mysql 报错 java.sql.SQLException: Unknown system variable 'query_cache_size'at com.mysql.cj.jdbc ...
- Unknown system variable 'query_cache_size'] with root cause
Unknown system variable 'query_cache_size'] with root cause 出现这个错误是因为mysql连接数据库的版本不对, mysql-connecto ...
- MySQL 8.0版本连接报错:Could not create connection to database server.
准备搭建一个Spring Boot 组合mybatis的项目,数据库采用的是MySQL 8.0.11按照以往的配置,使用插件mybatis-generator-maven-plugin生成代码时,一直 ...
- MySql 8.0 C#连接报错 MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host '12.118.224.181' for user 'root' using method 'caching_sha2_password' failed with message: Reading from t
解决方法 在连接字符串后面加上 SslMode=None
- java.sql.SQLException: Unknown system variable 'query_cache_size'
改为 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java< ...
- Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'
先是报错255,这个时候需要把 jdbc:mysql://localhost:3306/projUse 写成 jdbc:mysql://localhost:3306/projUse?useUnicod ...
- 解决MySQL8.0报错:Unknown system variable 'validate_password_policy'
一.问题描述 1.在安装MySQL8.0时,修改临时密码,因密码过于简单(如:123456),不符合MySQL密码规范,会触发一个报错信息: ERROR 1819 (HY000): Your pass ...
随机推荐
- 010-Go 操作PostgreSQL数据库2
1:sql脚本 create table post( id serial primary key, content text, author ) ) 2:post.go package post im ...
- SHELL pv uv 统计事例
#!/bin/sh #statistics newplive logs SOURCELOGS=$ ];then echo echo "please input file!" ech ...
- markdown table语法
普通的表格 | 一个普通标题 | 一个普通标题 | 一个普通标题 | | ------ | ------ | ------ | | 短文本 | 中等文本 | 稍微长一点的文本 | | 稍微长一点的文本 ...
- Linux安装和设置Samba服务器
1. 安装 安装前先关闭iptables和SELinux. Centos输入以下命令: yum install samba samba-client Ubuntu输入以下命令: apt-get ins ...
- Mybatis-Generator自动生成XML文件以及接口和实体类
整合了MySQL和Oracle配置文件生成方法 这个是整个文件夹的下载地址:http://www.codepeople.cn/download 主要给大家介绍一下generatorConfig.xml ...
- MySQL 批量杀mysql线程
mysql> SELECT concat('KILL ',id,';') FROM information_schema.processlist WHERE user='root'; +---- ...
- Android——自定义多击事件
一:使用场景 Android本身内置了点击.双击事件,但是某些时候,我们可能需要多击事件. 例如:某个秘密入口,为了避免用户误操作点击.双击到了触发开关而进入到不该被用户看到的页面,我们可以为入口控件 ...
- java 第一个java程序
public class Test16{ public static void main( String args[] ) { System.out.println ("welcome to ...
- CentOS7 使用ntp设置系统时间,开机自动设置时间,
首先如果没有安装ntp自己装一下: yum install -y ntp 然后,如果开了防火墙,记得打开自己的123端口,该端口是ntp用来同步时间的 firewall-cmd --zone=publ ...
- 播布客视频PIT专用播放器MBOO2015
播布客视频,还是挺不错... 很多视频都是pit后缀的,需要用MBOO2015才可以打开... 00.MB2015软件 01.视频样例 02.download 链接: https://pan.baid ...