The ibdata1 file contains the table data of your InnoDB tables. In large servers, this file can grow up to a very large size. When you delete innodb tables, MySQL does not free the space inside the ibdata1 file, that’s why it keeps growing. This file cannot be shrunk unless you delete all databases, remove the files and reload a MySQL dump.
In order to setup your server to use separate files for each table, you need to add the following parameter in my.cnf file.
[mysqld]
innodb_file_per_table
In order to shrink ibdata1, you actually need to delete the file.
Do a mysqldump of all databases, except the mysql and performance_schema
Drop all databases except the above 2 databases
Stop mysql
Delete ibdata1 and ib_log files
Start mysql
Restore from dump
When you start MySQL in step 5 the ibdata1 and ib_log files will be recreated.