for the first time I am faced with such a problem that has puzzled everyone.

I have all hosting busy (AWS lightsail) 78GB and after a few analyzes I realized that 90% of the memory is occupied in the mysql/data folder.

My wordpress website is weight - 6GB and I removed all binary logs before the problem, so the problem is not connected with that.

I can no longer log into phpmyadmin, because there is no free space left on the disk. But when I got there until the problem I saw that wp-option has a crazy amount of GB. No plugin was able to clear this and I decided to put it off.

Now that everything is busy, most of the commands cannot be executed, especially the mysql commands. I am using SSH. Help if possible.

  • 1
    since absolutely everything is busy, the only way to connect to mysql is via SSH (phpmyadmin is no longer possible to log in due to memory), but even so, not a single cleanup command works, and they give only one reason - there is no space to execute that command.
    – Edgar Poe
    Aug 30, 2020 at 7:54
  • "memory" is not "disk"; please check your use of terminology.
    – Rick James
    Aug 30, 2020 at 12:26
  • Dear James Rick. I literally wrote what I saw in SSH after my command. If you have any concerns, please write this to the bitnami team. I have already contacted with them to fix similar problems.
    – Edgar Poe
    Aug 30, 2020 at 14:54

1 Answer 1


To decrease the size of your tablespace, use this procedure:

  1. Use mysqldump to dump all your InnoDB tables.

  2. Stop the server.

  3. Remove all the existing tablespace files, including the ibdata and ib_log files. If you want to keep a backup copy of the information, then copy all the ib* files to another location before the removing the files in your MySQL installation.

  4. Remove any .frm files for InnoDB tables.

  5. Configure a new tablespace.

  6. Restart the server.

  7. Import the dump files.

after you restore database, the storage costed will shrink a lot.Due to mvcc and page splitting,the data storage space will grow much during db working process.

  • Since you are using AWS, it might be easier to export/import the data to a new instance.
    – Rick James
    Aug 30, 2020 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.