Could not create connection to database server,一直连接不上数据库,后面发显示mysql版本太低导致的。
本地是5.1版本,阿里云上的是8.0.升级下驱动,解决
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.16</version> </dependency>1、Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is
com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
** 2、jdbc_url上的时区变为必须配置,否则会启动报错。**
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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.
版权归原作者 程序猿家族成员 所有, 如有侵权,请联系我们删除。