最近编译安装MySQL5.7.x后,记录的日志的实际为utc时间,不适合查看,修改为system时间。
0 1 2 3 |
2017-03-24T04:59:45.826506Z 73035 [Note] Aborted connection 73035 to db: 'a' user: 'root' host: '1.1.1.1' (Got an error reading communication packets) 2017-03-24T05:09:37.163762Z 72352 [Note] Aborted connection 72352 to db: 'a' user: 'root' host: '1.1.1.1' (Got an error reading communication packets) 2017-03-24T05:20:40.719462Z 66896 [Note] Aborted connection 66896 to db: 'a' user: 'root' host: '1.1.1.1' (Got an error reading communication packets) 2017-03-24T05:53:02.994317Z 76079 [Note] Aborted connection 76079 to db: 'a' user: 'root' host: '1.1.1.1' (Got an error reading communication packets) |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
mysql> show global variables like 'log_timestamps'; +----------------+-------+ | Variable_name | Value | +----------------+-------+ | log_timestamps | UTC | +----------------+-------+ 1 row in set (0.00 sec) mysql> set global log_timestamps=SYSTEM; Query OK, 0 rows affected (0.00 sec) mysql> show global variables like 'log_timestamps'; +----------------+--------+ | Variable_name | Value | +----------------+--------+ | log_timestamps | SYSTEM | +----------------+--------+ 1 row in set (0.00 sec) |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!