Home WebServer PanelaaPanel How to handle full space due to mysql-bin aaPanel

How to handle full space due to mysql-bin aaPanel

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

1. Overview

Suddenly one day, all your websites on your VPS/Server failed simultaneously and displayed the same content as shown below:

Unknown

In this case, your VPS/Server is at full capacity, the cause of full capacity is a lot, but in this article, AZDIGI will guide you through handling full capacity due to mysql-bin on aaPanel.

Refer to AZDIGI’s VPS/Server service here!

Determine the cause and how to handle full capacity due to mysql-bin on aaPanel

To determine the cause and handling of full capacity due to mysql-bin on aaPanel, we need to do the following 3 steps.

Step 1: SSH into your VPS/Server system

To full capacity due to mysql-bin on aaPanel, we first need to SSH or access your VPS/server with root privileges. If you do not know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSHing, we continue with step 2 to begin to determine the cause of the error.

Step 2: Determine the cause of the full capacity of the VPS/Server

After SSH into your VPS/Server, we use the df-h command to see which partition is 100% full.

mysql-bin aaPanel

In the image above, you can see that your / partition is getting full. Use the command cd / to move into the / partition and check again with the du -sh * command.

Screen Shot 2020 07 29 at 1.50.47 PM

You can see that the www directory takes up the most space, continue to use the command cd www to move into this directory and use the command du -sh * to check.

Screen Shot 2020 07 29 at 1.51.00 PM

Continue to move into the server directory and use the old command du -sh * to check further.

Screen Shot 2020 07 29 at 1.51.16 PM

You can see that the data directory takes up the most space, continue to use the command cd data to move into this directory and use the command du -sh * to check.

mysql-bin aaPanel

You can see that there is a lot of mysql-bin.* files that take up a lot of space. So determining the cause of taking up a lot of space is caused by mysql-bin (binary logs).

Step 3: Fix the error at full capacity due to mysql-bin on aaPanel

To handle the full capacity due to mysql-bin on aaPanel, we need to modify the configuration of the mysql service to turn off binary logs. To change, we use the following command:

AZDIGI Tutorial
vi /etc/my.cnf
    

We find the line log-bin=*, press i to modify mode and add # at the beginning of the line as shown below, you can also add # to the binlog_format=* line if you want:

Screen Shot 2020 07 29 at 1.53.07 PM

Before modify

Screen Shot 2020 07 29 at 1.53.32 PM

After modify

After modifying, you press the : key and then the x characters to save.

Use the service service mysqld restart restart command to get the mysql service to receive the new configuration.

Screen Shot 2020 07 29 at 3.19.51 PM

After restarting the mysqld service, you can completely delete the mysql-bin.* files. You can use the rm -f mysql-bin.* command for quick deletion. Then check the VPS/Server capacity with the df -h command.

Screen Shot 2020 07 29 at 3.22.39 PM

We can see that the capacity of the / directory has been greatly reduced.

3. Summary

Hopefully, through this article, you have learned how to quickly handle the problem of full capacity due to mysql-bin on aaPanel, as well as how to determine which folders take up a lot of space on your VPS/Server. Although this problem is not unique to aaPanel, with aaPanel currently, mysql-bin(binary logs) is enabled by default, so you may encounter it. This approach can also be applied to similar cause-and-effect situations. Hope this article will be helpful to you.

Wishing you success.

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign