I came up with an idea on how to shrink ibdata1 in mysql database then i got this solution on stackoverflow
STEP 01) MySQLDump all databases into a SQL text file (call it SQLData.sql)
STEP 02) Drop all databases (except mysql schema)
STEP 03) Shutdown mysql
STEP 04) Add the following lines to /etc/my.cnf innodb_file_per_table =1
STEP 05) Delete ibdata1, ib_logfile0 and ib_logfile1
STEP 06) Restart mysql
STEP 07) Reload SQLData.sql into mysql
after that steps, i executed SELECT TABLE_NAME, TABLE_SCHEMA, Data_free FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema', 'mysql') AND Data_Free >0;
at sqlyog, this is the output:
after that i run:
mysqlcheck -u root -p$pw --debug-info --all-databases --auto-repair
mysqlcheck -u root -p$pw --debug-info --all-databases --optimize
then i query show table status on sqlyog, what i am expecting is under data_free column will be a value of zero, since on my current setup its should release unused space space.
and my question is, is there something wrong in what i did? how am i gonna do it right in reclaiming unused space in innodb tables?
mysql 5.5 on rhel 6.3
Regards,
John