# Mysql – the use of ibdata1 file in thesql

innodbMySQLmysql-5

I have application which has the backend db as Mysql(InnoDb engine), and currently my client wants to decrease the size of the ibdata file to some fixed size. I found the three below solutions.

• Solution 1: innodb_file_per_table
• Solution 2: innodb_data_file_path=ibdata1:50M;ibdata2:50M:autoextend
• Solution 3: innodb_data_file_path=ibdata1:10M:autoextend:max:50M

And I really dont have knowledge about the ibadata1 file, can anybody help me on this and I want to know whether is it safe to fix the ibdata size(solution 3) and what does the ibdata exactly for?

without using innodb_file_per_table, the ibdata file never compresses or shrinks, Not when you delete a row, drop a table, or a database. In no time, 3GB of data can become a 20GB file if you have an active queuing system.