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.