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 record / table / database, the file is still the same size. This can be very inappropriate if your server disk space is limited.

With the 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.


Please comment below, if you have any questions.

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.