AMH panel mysql-bin log files consume hard disk resource processing method

Source: Internet
Author: User

To share the AMH panel (free 4.2 version), Mysql-bin occupy resources too big solution.

| mysql-bin.000280 | 104857695 |
| mysql-bin.000281 | 104857974 |
| mysql-bin.000282 | 104857873 |
| mysql-bin.000283 | 104857787 |
| mysql-bin.000284 | 104857778 |
| mysql-bin.000285 | 104857901 |
| mysql-bin.000286 | 104857999 |
| mysql-bin.000287 | 104857860 |
| mysql-bin.000288 | 104857698 |
| mysql-bin.000289 | 104857773 |
| mysql-bin.000290 | 104857751 |
| mysql-bin.000291 | 104857741 |
| mysql-bin.000292 | 104857926 |
| mysql-bin.000293 | 104857693 |
| mysql-bin.000294 | 104857684 |

We can see 31st in just a few hours, cache resources to occupy a few g, if this goes on, the basic VPS hard drive, not a few hours or 2 days, will be directly occupied. We are sure to solve this problem before we can.

First, clean up existing mysql-bin files

It is best not to delete directly, may cause the MySQL can not start the problem, or through the following method, login ssh, enter:
The code is as follows Copy Code
Mysql-u root-p
Then enter the database password, and then enter:
The code is as follows Copy Code
Reset Master;
This will erase all the cache mysql-bin.

Second, limit the generation of Mysql-bin

Cached files are still useful and can be used to restore data usage in the event of a MySQL problem, but we can do so only if you need to prevent it from being generated.

Locate the file in/ETC/MY.CNF and then update the server file with the 20 line Log-bin = Mysql-bin with the # annotation.

Third, restart AMH panel MySQL

The code is as follows Copy Code
AMH MySQL Restart
Enter the above command and restart MySQL to fix the problem we need.
Summary, generally we use AMH panel or LNMP when most users will not deal with these problems, will only be open in the site, the data disk is full and then find someone to solve. See this article method, even if we do not solve problems or regular maintenance, in the face of problems can learn to solve their own mysql-bin hard disk problem.

Prohibit MySQL Log

/etc/my.cnf

Edit this file, find Log-bin=mysql-bin and binlog_format=mixed two lines, before # comment out. Again, we restart MySQL to take effect.

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.