My Webmin displayed an error message saying the disk is full. Upon investigation, I found 3 files inside /var/lib/mysql has grown too big.
mysql.ibd (8.8G)
undo_001 (8.4G)
undo_003 (2.5G)
I googled to check whether these files can be removed (rm) but the suggestion was against mysql.ibd
while no clear information on undo_001 & undo_002.
How can I safely remove files and which one to restore to the server? As of now, 0 bytes is free, and nothing I can do on the server.
Another question is how to prevent these files from growing so big.
Man I wish I documented this problem. I only had it once and after quite a bit of Googling I managed to fix it. One of my network admin friends just called me with a fresh installation of Virtualmin and he has the same problem. Now he can’t even start MySQL anymore.
That post has no accepted answer yet on stack, and seems to refer to the generic growth of a table. I think what our user was dealing with is rather a bug or something, but either way, he seems to have reverted to stack and gotten an accepted answer here:
To me it looks like this sequence might do the job, provided you still have control over your database:
ALTER UNDO TABLESPACE tablespace_name SET INACTIVE;
DROP UNDO TABLESPACE tablespace_name;
SET GLOBAL innodb_undo_log_truncate=ON;