MySQL – IDB Files Not Named After Tables

innodbMySQL

In my Linux filesystem, there are many ibd files (InnoDB file per table is ON) which are not named after tables. What are these files and what data do they contain? The question has arisen due to space limitations on the server.

4.2G    ./var/lib/mysql/wift/#sql-ib179-1438865579.ibd
4.2G    ./var/lib/mysql/wift/#sql-ib179-1413146901.ibd
4.2G    ./var/lib/mysql/wift/#sql-ib179-1376672335.ibd
4.2G    ./var/lib/mysql/wift/#sql-ib179-1355103119.ibd
4.2G    ./var/lib/mysql/wift/#sql-ib179-1163730678.ibd
128M    ./var/lib/mysql/wift/customers.ibd

Best Answer

That are orphaned temporary files, when mysql crashes during an alter table

Orphan temporary table names begin with an #sql- prefix (e.g., #sql-540_3). The accompanying .frm file has the same base name as the orphan temporary table.

see manual

There you will find also how to deal with them

in mysql 8 they don't appear any more