MySql is a great database and InnoDB is one of the engines you can use; the other popular choice and default is MyISAM (a good post explaining the differences). If you work with large amounts of data you can sometimes run into weird problems you didn't know about or expect.
InnoDB saves all the tables in your database into one file: ibdata1 (and an ib_log file). That's all well and good, except it doesn't delete information from them when you erase a table. So your ibfile1 will never decrease in size. This only becomes a problem with large amounts of data and the use of temporary tables. I don't know why this is the default behavior, but there is a very simple solution to get around this problem: use unique files for each table.
Make sure you backup everything before doing this and I don't recommend doing this on a live system.
1. Open up your my.cnf (mysql configuration file)
If you don't know where it is try searching for it:
find / -name my.cnf
2. Add the following under [mysqld] portion of the config:
3. Remove old files: ibdata1 and ib_log
4. Restart mysql (a couple examples below)
service mysqld restart
MySql will now save innodb tables into unique files and delete them when you delete the tables.
Latest posts by Kevin Ohashi (see all)
- WordPress Hosting Performance Benchmarks (2018) - January 30, 2018
- Hostinger’s Fake Reviews – A Guide on How NOT to Promote Your Company - December 6, 2017
- Black Friday and Cyber Monday Web Hosting Deals (2017) - November 21, 2017