Today, encountered a problem, Zabbix prompt data disk/opt less than 20%, need to clean up. After viewing,/opt/mysql a log file reached 16G, and the data disk total 20G, the log file is Master.log, the query, it is the general query log MySQL, record additions and deletions to change the operation.
Through the Internet to check the information, learned that the general query log--can be closed
First, go to MySQL, enter
Mysql> show global variables like '%general% ';
+------------------+-----------------------+
| variable_name | Value |
+------------------+-----------------------+
| General_log | On |
| General_log_file | /opt/mysql/master.log |
+------------------+-----------------------+
2 rows in Set (0.00 sec)
After that, enter
mysql> Set Global general_log = off; Close query Log
Mysql> show global variables like '%general% ';
+------------------+-----------------------+
| variable_name | Value |
+------------------+-----------------------+
| General_log | OFF |
| General_log_file | /opt/mysql/master.log |
+------------------+-----------------------+
2 rows in Set (0.00 sec)
This article is from the "Hades Blog" blog, please be sure to keep this source http://hades02.blog.51cto.com/9768670/1641652
General_log (query log) off in MySQL