标签:sys show variable 记录 gen oba ror value global
在MySQL 5.7.2 新增了 log_timestamps 这个参数,该参数主要是控制 error log、genera log,等等记录日志的显示时间参数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)
因为log_timestamps ?是一个GLOBAL的全局参数,所以直接在登录后去set全局参数,重启后就会直接失效
因此需要在mysql的配置文件/etc/my.cnf中[mysqld]中增加一条log_timestamps的配置
log_timestamps=SYSTEM
标签:sys show variable 记录 gen oba ror value global
原文地址:http://blog.51cto.com/wujianwei/2350163