By default MySQL 5.5 and prior store all InnoDB tables in a single table space or file. Improved performance and managability can be accheived by using the innodb_file_per_table option to cause MySQL to use a separate file for each table. This option is enabled by default on MySQL 5.6 and later.
To implement:
1. Add option to my.cnf:
1 2 |
[mysqld] innodb_file_per_table=1 |
2. Change table to use single file:
1 |
ALTER TABLE table_name ENGINE=InnoDB; |
If you want to covert all databases then dump the entire database and import back into the server.
1 2 |
mysqldump --all-databases > db.sql mysql < db.sql |