问题:
通过Pycharm 中的database 连接本地的MSQL数据库碰到报错,如下:
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 server Timezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
分析:
因为安装mysql的时候时区设置的不正确 mysql默认的是美国的时区,而我们中国大陆要比他们迟8小时,采用+8:00格式
解决:
set global time_zone='+8:00'
参考文章:
转载于:https://www.jianshu.com/p/a02c7d8731e1