General_log (query log) off in MySQL

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.