Cannot connect to “Connection”. The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC
用pycharm idea 这些的插件连接MySQL数据库的时候,报错这个 通常是time zone时区的原因,低版本数据库需要配置文件 ,自MySQL 8.0 GA版本开始支持将参数写入并且持久化:
这里分享mysql8.0以上版本的简洁的解决方法,在mysql命令行输入 :set persist time_zone=’+0:00’;
注意,这里一定是’+0:00’;
,区分大小写
而且一定要英文半角字符,不然很容易报错ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':00’' at line 1