/var/lib/mysql/ibdata1 too big

morteza

Member
Dec 8, 2009
20
0
51
Hi,

This is a general question, I was wondering if any of you guys can help me with. /var/lib/mysql/ibdata1 grows up to 9GB and more, and this leaves no disk space on /var partition. Is it possible to move this file to another partition and make a link in /var/lib/mysql instead? Or do you know any solutions without altering /var size?
 

24x7server

Well-Known Member
Apr 17, 2013
1,894
91
78
India
cPanel Access Level
Root Administrator
Hello,

Yes, It's possible to change MySQL directory partition on your server using the following steps

1) Stop the MySQL on your server

2) Move your /var/lib/mysql directory to /home (other partition which have free space on your server)

3) create the symbolic link of /var/lib/MySQL to your new MySQL directory location

ln -s /home/mysql /var/lib/mysql
4) And start the MySQL on your server


Thank you :)