8.0.18 错误日志时间慢了8个小时

8.0.18 错误日志时间慢了8个小时
2019-10-29T07:58:56.684916Z 0 [Note] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to 192.xxx.xxx.xxx:3316, 192.xxx.xxx.xxx:3316, 192.xxx.xxx.xxx:3316 on view 15723358711210252:3.'
2019-10-29T07:58:56.705588Z 19 [Note] [MY-010914] [Server] Aborted connection 19 to db: 'unconnected' user: 'rpl_user' host: '192.xxx.xxx.xxx' (failed on flush_net()).
2019-10-29T07:58:58.053213Z 0 [Note] [MY-011492] [Repl] Plugin group_replication reported: 'The member with address 192.xxx.xxx.xxx:3316 was declared online within the replication group.'


操作系统
[root@mgr1 logs]# date
Tue Oct 29 16:13:53 CST 2019


mysql> show variables like "%time_zone%"
-> ;
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | CST |
| time_zone | +08:00 |
+------------------+--------+
2 rows in set (0.01 sec)

mysql>


[root@mgr1 logs]#

mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2019-10-29 16:15:42 |
+---------------------+
1 row in set (0.00 sec)

mysql>

 

解决:
[root@mgr1 ~]# timedatectl status
Local time: Tue 2019-10-29 16:11:24 CST
Universal time: Tue 2019-10-29 08:11:24 UTC
RTC time: Tue 2019-10-29 08:14:22
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
[root@mgr1 ~]#


mysql> show variables like 'log_timestamps';
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| log_timestamps | UTC |
+----------------+-------+
1 row in set (0.00 sec)


log_timestamps 默认取的是UTF时间所以是有问题的
set persist log_timestamps=system;
[mysqld]
log_timestamps=system

 

posted @ 2019-10-29 16:59  刘启武  阅读(383)  评论(0编辑  收藏  举报