#设置允许远程登录mysql
grant all privileges on . to ‘root’@’%’ identified by ‘123’ with grant option;
flush privileges;
#设置修改时区,重启后无效
set time_zone = ‘+8:00’;
set global time_zone = ‘+8:00’;
flush privileges;
#设置修改时区的配置文件
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini
default-time_zone = ‘+8:00’
然后重启mysql