当前位置:网站首页>MySQL enable logging
MySQL enable logging
2022-06-29 07:52:00 【Mzz steed】
Turn on general_log journal
mysql> set global general_log=on; -- Open log
Query OK, 0 rows affected (2.60 sec)
mysql> show variables like 'general_log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| general_log | ON |
+---------------+-------+
1 row in set (0.00 sec)
mysql> set global general_log_file='/opt/sudytech/mysql/data/general.log'; -- Specify the log generation location
Query OK, 0 rows affected (0.05 sec)
mysql> show variables like 'general_log_file';
+------------------+--------------------------------------+
| Variable_name | Value |
+------------------+--------------------------------------+
| general_log_file | /opt/sudytech/mysql/data/general.log |
+------------------+--------------------------------------+
1 row in set (0.04 sec)
because log_output The default value is FILE. So there's no need to modify .
see /opt/sudytech/mysql/data/ The directory has produced general.log journal
[[email protected] data]# pwd
/opt/sudytech/mysql/data
[[email protected] data]# tail -f general.log
2021-05-18T06:45:32.140829Z 2 Query set global general_log=OFF
/opt/sudytech/mysql/bin/mysqld, Version: 5.7.32-log (MySQL Community Server (GPL)). started with:
Tcp port: 3306 Unix socket: /tmp/mysql.sock
Time Id Command Argument
2021-05-18T10:43:17.049473Z 3 Query show variables like 'general_log'
2021-05-18T10:44:09.060990Z 3 Query set global general_log_file='/opt/sudytech/mysql/data/general.log'
/opt/sudytech/mysql/bin/mysqld, Version: 5.7.32-log (MySQL Community Server (GPL)). started with:
Tcp port: 3306 Unix socket: /tmp/mysql.sock
Time Id Command Argument
2021-05-18T10:44:18.375549Z 3 Query show variables like 'general_log_file'
......
Permanent changes need to be made in my.cnf in [mysqld] add to
general_log = 1
general_log_file=/opt/sudytech/mysql/data/general.log
边栏推荐
- Some examples.
- tf. compat. v1.assign
- SQL SERVER 2008 发布订阅到SQL Server 2017避坑指南
- 嵌入式产品防盗版
- [FreeRTOS] interrupt mechanism
- Reasons why the ext.dic file configured in ES does not take effect
- 100 lectures on Excel advanced drawing skills (VI) - practical application cases of Gantt chart in project progress
- Django - installing mysqlclient error: mysqlclient 1.4.0 or newer is required; you have 0.9.3
- Vulnhub's dc9 target
- Kingbasees v8r6 cluster maintenance case - data migration between clusters
猜你喜欢

postman预处理/前置条件Pre-request

C actual combat - high configuration version of Snake game design

【深度之眼吴恩达第四期作业班】多元线性回归Linear Regression with multiple variables总结

How to permanently set Mysql to utf8 encoding?

【工控老马】基于PLC的花样喷泉设计原理详解

4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?

C#Mqtt订阅消息

Dump (cl\alv\tree\base================================cp|set\items\for\column) when expanding node or clicking toolbar button

C实战——高配版贪吃蛇游戏设计

Reasons why the ext.dic file configured in ES does not take effect
随机推荐
Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200
路由详解(九阳真经)
SQL Server 2008 publish and subscribe to SQL Server 2017 pit avoidance Guide
The table cannot be vacuumed because the cursor is open for a long time
Postman pre request
From XX import* is equivalent to from XX import *, and no space is required
基础语法 - 位运算
【深度之眼吴恩达机器学习作业班第四期】逻辑回归编程实现
Common MySQL errors and solutions summarized painstakingly (I)
Kyushu cloud helps Inner Mongolia's "counting from the east to the west" project to drive the smart new ecology of the surveying and mapping industry
Schnuka: 3D visual inspection scheme 3D visual inspection application industry
Explanation of swing transformer theory
Detailed explanation of route (Jiuyang Scripture)
VSLAM特征之线特征&面特征
Vibration signal generation and processing based on MATLAB Doppler effect
Select distinct on statement in kingbasees
mysql 开启日志功能
【深度之眼吴恩达第四期作业班】多元线性回归Linear Regression with multiple variables总结
Listen to textarea input through Keyup to change button style
【深度之眼吴恩达机器学习作业班第四期】Logistic Regression 逻辑回归总结