Our /var partition is full and it is causing problem with our MySQL database. We've noticed that the ibdata1 file is taking up about 90% of the partition. We need a quick solution. It doesn't have to be the best because this server is being shut down permanently in 4 months.

What I was thinking of doing is moving the ibdata1 file to a larger partition. From what I've read, I think the following might work but would like to know for sure.

1. Stop the mysql server
2. Move the ibdata1 file to the other partition (/ibdata)
3. Edit my.cnf and add the following in the [mysqld] section:
4. Restart the mysql server

Can anyone confirm if this will work in moving the file? Is there a chance that we lose some data in doing this?