Large binary file MySQL

Programming Oct 12, 2018

By default, MySQL stores all databases into one binary file.

This is a quick tip for the database engine MySQL/InnoDB.

MySQL creates and updates one binary file, containing your database data.

The problem is, that the filesize increases on every data insert, update and so on. If you delete a table or database, the binary file will not reduce in size. This can become a problem, if your server disk space is limited.

With the SQL command

SET GLOBAL innodb_file_per_table=1;

you can change this behavior. MySQL will create a file for every next database. This file can be removed it, if the database gets deleted as well.


Credits:

Tags

Stefan

Howdy! I'm Stefan and I am the main author of this blog. If you want know more, you can check out the 'About me' page.

Impressum | Data Privacy Policy | Disclaimer
Copyright: The content is copyrighted and may not be reproduced on other websites without permission.