Remove MySQL ibdata1 without dumping and restoring existing proper databases
Posted
by
Halfgaar
on Server Fault
See other posts from Server Fault
or by Halfgaar
Published on 2013-11-11T20:10:28Z
Indexed on
2013/11/11
21:56 UTC
Read the original article
Hit count: 155
mysql
My MySQL server contains two 100+ GB big databases. One was created with innodb_file_per_table
and one wasn't. The one that wasn't, has been dumped, ready to be reloaded. However, the ibdata1 file is still huge and I don't have enough free space. Normal advice in this situation is to dump and remove each database, stop MySQL, then remove ibdata1 and the transaction logs, and then reload the databases.
My specific question is: can I leave databases that were created with innodb_file_per_table
alone? Or will they be destroyed when I remove ibdata1, even though all their files are separate?
I can't afford to take this database off-line to dump and reload it. And because it's already properly made with separate files per table, it would feel pretty useless.
© Server Fault or respective owner