phpstorm 连接MySQL报错
重现情景
使用phpstorm连接MySQL时,如下图操作
phpstorm报如下错误:
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.
解决方法
如下图所示:
修改连接URL
在添加好MySQL信息之后,正在URL输入框中最后面加上
?serverTimezone=UTC
或者
?serverTimezone=GMT