Mysql – ibdata1 back to it’s original size after deleting it

innodbMySQL

I have followed the following steps in order to save space but I am surprised after restarting MySQL ibdata1 gets back to it's original size.

As you want to reclaim the space from ibdata1 you actually have to
delete the file:

  1. Do a mysqldump of all databases, procedures, triggers etc except the mysql and performance_schema databases
  2. Drop all databases except the above 2 databases
  3. Stop mysql
  4. Delete ibdata1 and ib_log files
  5. Start mysql
  6. Restore from dump

Source

Best Answer

Did you have innodb_file_per_table = ON?

Regardless of the above setting, ibdata1 will have some stuff in it. Without more specifics (size of that file, the above setting, number of tables, number of .ibd files, etc.), I cannot be more specific.

In my opinion, "tiny" tables may as well be built with file_per_table = OFF.