How to turn off MySQL log and delete mysql log

Source: Internet
Author: User
LNMP One-click Install package installed MySQL by default, the log file is turned on,
A large number of logs are generated if the data is operated more frequently.
Produce similar mysql-bin.0000* files under/usr/local/mysql/var/,
and generally dozens of MB to several GB, but also eat the entire hard disk space,
Never cause MySQL to start or error, such as VPS Forum user feedback.
How to turn off the MySQL log feature: delete log: Execute:/usr/local/mysql/bin/mysql-u root-p
Enter password login and then execute: RESET master;
Re-enter: Quit the mysql command mode.
Completely disable MySQL log: Modify the/etc/my.cnf file,
Find Log-bin Search =mysql-binbinlog_format=mixed the two lines before adding #,
Comment it out, and then execute/etc/init.d/mysql restart.
Or go directly to the directory/usr/local/mysql/var/delete log files to normal use!

How to turn off MySQL log and delete mysql log

Related Article

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.