在安装MYSQL的时候,MYSQL的默认时间并不是北京时间
进入mysql可以查看 mysql> show variables like '%time_zone%';
mysql> show variables like '%time_zone%';
这里可以修改my.ini文件 添加 default-time-zone = '+8:00' 修改重新启动MYSQL就OK了
net stop mysql------------------
net start mysql------------------
mysql> show variables like '%time_zone%';
+------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | | | time_zone | +08:00 | +------------------+--------+ 2 rows in set, 1 warning (0.00 sec)
mysql> select now(); +---------------------+ | now() | +---------------------+ | 2013-11-28 17:13:13 | +---------------------+ 1 row in set (0.00 sec)
春风如贵客,一到便繁华