I have a MySQL development server that uses InnoDB tables in some of the databases. It was originally setup with the defaults so all data went into the system tablespace (e.g the main
ibdata1 file). Along the way, I enabled innodb_file_per_table so new database tables get into their own files.
I now want to reclaim disk space from dropping some development databases. I know I have to mysqldump and re-import those databases that are in the system tablespace. What is the best way to determine which ones to focus on?
I don't see anything obvious in the
information_schema database. I could manually poke around the server with an SSH shell, but I was looking for a more automated or elegant way to do that.
In some older databases, I only see
.frm files in the database directory, in newer ones I see
.ibd files. That seems to be the key to know where the data is ...
Sanity Check: Is it even possible to mysqldump half the databases to reclaim space, or do you really have to do every database? There are 54 databases inside this server that use InnoDB tables.
Note: Using MySQL v5.1 on UNIX.