Mysql 版本:mysql Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL), 使用 5.x.x 或较低版本的 JDBC driver for MySQL 会出现连接问题:
1 2 3
Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1019) ... 16 more
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.
// Walk through the loaded registeredDrivers. for(DriverInfo aDriver : registeredDrivers) { // If the caller does not have permission to load the driver then // skip it. if(isDriverAllowed(aDriver.driver, callerClass)) { result.addElement(aDriver.driver); } else { println(" skipping: " + aDriver.getClass().getName()); } } return (result.elements()); }