MySQL问题记录
使用逆向工程链接数据库异常
Unknown system variable ‘query_cache_size’
报错 :java.sql.SQLException: Unknown system variable ‘query_cache_size’
问题定位 :
网上查了原因是mysql-connecter-java的版本过低,很显然是数据库驱动程序与数据库版本不对应;
本地mysql版本8.0.19,而数据库链接pom中的版本是5.1.38
解决办法:
调整pom版本一致,得以解决;
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.19</version>
</dependency>
You must configure either the server or JDBC driver (via the ‘serverTimezone’ configuration property)
报错 :
2020-04-11 21:14:58.943 ERROR 10568 --- [reate-554680346] com.alibaba.druid.pool.DruidDataSource : create connection error, url: jdbc:mysql://localhost:3306/st-member?useUnicode=true&characterEncoding=UTF-8&useSSL=false, errorCode 0, state 01S00
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.19.jar: