Tuesday, 24 January 2017

How do we shrink ibdata?

Below are the steps performed to shrink ibdata1

1. Backup MySQL DB and drop the DB
2. Stop MySQL service and add innodb_file_per_table=1 in my.cnf
3. Remove ibdata1, ib_logfile0 and ib_logfile1
4. Start MySQL service and restore the database

No comments:

Post a Comment