在项目maven连接数据库时发生如下错误:
Connection to localhost failed. [08001] Could not create connection to database server.
在查阅资料后发现这是数据库时区引起的 。我的MySQL版本如下:
idea连接到数据库发生如下报错信息:
在URL后面添加:?serverTimezone=UTC 这个就可以了 如下图:
这样就解决了这个异常信息。
在项目maven连接数据库时发生如下错误:
Connection to localhost failed. [08001] Could not create connection to database server.
在查阅资料后发现这是数据库时区引起的 。我的MySQL版本如下:
idea连接到数据库发生如下报错信息:
在URL后面添加:?serverTimezone=UTC 这个就可以了 如下图:
这样就解决了这个异常信息。