How to solve the problem that MySQL disk is full of repair tables

Source: Internet
Author: User

Question 1: The MySQL disk is full.

Question 2: mysql repair multiple tables

Repair table: perform the following steps by week:

1: lock table EE write;

2: flush table EE;

3: repair table EE;

4: flush table EE;

5: unlock table EE;

// A strange problem was found during mysql usage:

My disk space is almost full (% 90). df du looked at it and mysql occupied a lot of space. So I deleted half of the data in each mysql table, however, the hard disk space is still occupied by % 90.

I did not care, but after half a month, the disk is still not full, it is reasonable to say that the alarm will soon exceed % 90.

So I want to find out the reason:

Method 1: A process is suspected to be thinking about data and cannot delete the data.

./Mysqladmin shutdown

./Mysqld-safe

Restarting mysql has no effect

Method 2: flush each table.

Method 3: One of the repair tables, it seems that the original 700 M space is programmed about M.

But the problem comes again. I have 256 tables. I have written C ++ programs and repair each table in sequence, but Commands out of sync will be generated; you can't run this command now error, cannot sync

Later, I tried the following: repair table1, table2, table3; and so on.

The original repair can repair multiple tables at a time, and the problem is solved.

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.