I've followed the instruction in this thread ( https://dba.stackexchange.com/questions/8982/what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql ) successfully but after 2 months the ibdata1 continues to grow. I've tried optimizing tables but it didn't reclaimed lost storage space. How do i shrink ibdata1 file size? Is there any way to delete it safely?
Asked
Active
Viewed 2,632 times
1
-
There are several uses for ibdata1 other than tables. How big is it now? If it is a few megabytes, I would not worry. Also, what is the value in my.cnf for its initial size? – Rick James Dec 01 '15 at 21:45
1 Answers
3
As you want to reclaim the space from
ibdata1
you actually have to delete the file:
- Do a
mysqldump
of all databases, procedures, triggers etc except themysql
andperformance_schema
databases- Drop all databases except the above 2 databases
- Stop mysql
- Delete
ibdata1
andib_log
files- Start mysql
- Restore from dump

Community
- 1
- 1

Rahul Tripathi
- 168,305
- 31
- 280
- 331
-
do i have to do this again? i have done this 2 months ago. or is this the only way? – Christian Burgos Nov 09 '15 at 08:03
-