Re: Database size increased when I delete huge data
The InnoDB tablespace files (ibdata*) are designed to reuse space, so there's not a simple way to reclaim space--you can't just remove a data file from system tablespace. To shrink tablespace file size ...
1. Dump all InnoDB tables with mysqldump.
2. Stop MySQL server.
3. Move all existing tablespace files (ibdata*, iblog*), and all .frm files for InnoDB tables, from the data folder to a safe place.
4. Configure a new tablespace, or set innodb_file_per_table=1 so that you henceforward have direct control over file size.
5. Restart MySQL server.
6. Import the dump files.
Subject
Views
Written By
Posted
2242
November 02, 2017 12:51AM
Re: Database size increased when I delete huge data
1077
November 02, 2017 11:11AM
800
November 02, 2017 09:14PM
963
November 02, 2017 09:20PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.