国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 數(shù)據(jù)庫(kù) > MySQL > 正文

Mysql5.7錯(cuò)誤日志時(shí)間不對(duì)的處理辦法

2024-07-24 12:32:16
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
        MySQL 5.7的錯(cuò)誤日志時(shí)間和系統(tǒng)時(shí)間不一致,看起來(lái)費(fèi)勁,查閱官方文檔得知從MySQL 5.7.2 開始,新增了 log_timestamps 參數(shù),它主要是控制 error log、genera log等日志文件的顯示時(shí)間參數(shù):
       官文如下:
       This variable controls the timestamp time zone of error log messages, and of general query log and slow query log messages written to files. It does not affect the time zone of general query log and slow query log messages written to tables (mysql.general_log, mysql.slow_log). Rows retrieved from those tables can be converted from the local system time zone to any desired time zone with CONVERT_TZ() or by setting the session time_zone system variable.
 
       This variable was added in MySQL 5.7.2. Before 5.7.2, timestamps in log messages were written using the local system time zone by default, not UTC. If you want the previous log message time zone default, set log_timestamps=SYSTEM.
 
做了如下修改后,顯示正常了:
 
(root@localhost) [(none)]> set global log_timestamps=SYSTEM;
Query OK, 0 rows affected (0.00 sec)
 
(root@localhost) [(none)]> SHOW global variables like 'log_timestamps';
+----------------+--------+
| Variable_name | Value |
+----------------+--------+
| log_timestamps | SYSTEM |
+----------------+--------+
1 row in set (0.01 sec)
 

(編輯:武林網(wǎng))

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 磐石市| 开鲁县| 阜平县| 太谷县| 苍南县| 泌阳县| 泗阳县| 万源市| 岱山县| 莲花县| 博罗县| 平阴县| 晋宁县| 重庆市| 祁东县| 根河市| 舒城县| 乌兰浩特市| 沅陵县| 湘西| 富锦市| 遵义市| 迁西县| 淄博市| 宜兴市| 宁乡县| 汕头市| 宿迁市| 民丰县| 化隆| 彰化市| 金秀| 长治市| 西青区| 原平市| 山阳县| 和林格尔县| 读书| 手游| 霍州市| 旬邑县|