查看mysql当前时间,当前时区
select now(); show variables like "%time_zone%";

修改时区
set global time_zone = '+8:00';
##修改mysql全局时区为北京时间,即我们所在的东8区
set time_zone = '+8:00';
##修改当前会话时区
flush privileges;
#立即生效
rpm安装的修改my.cnf配置文件
vim /usr/my.cnf
增加
default-time_zone = '+8:00'