Page 1 of 1
Changing MySQL Default location?
Posted: Tue Nov 05, 2013 9:40 am
by disrael
We are running out of room in /var and we are looking at moving the MySQL DB files and log files to a different location. Would this pose an issue down the road with a Nagios Patch/Upgrade? We are making all changes in the /etc/my.cnf.
-Doron
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 10:24 am
by slansing
Well you can certainly offload your database:
http://assets.nagios.com/downloads/nagi ... Server.pdf
You will have to change quite a few more files than just my.cnf because of ndo and web interface access.
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 11:22 am
by disrael
I forgot you guys don't have ESP ><
We are looking at putting it in a different location/partition on the same server.
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 11:30 am
by sreinhardt
Ah esp, that would be nice!

Probably the easiest way would be to copy the existing files in/var/lib/mysql to tmp or somewhere else, mount the new partition under /var/lib/mysql and copy the existing files onto the new partition. This way you would not need to alter the mysql configs at all and could change drives at a later date again if needed.
edit: Don't forget to stop nagios, ndo2db, and mysql before making the move.
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 11:31 am
by abrist
If symlinks are an option, they will most definitely be the easiest way to move the actual location of the tables.
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 12:26 pm
by disrael
We do have more limited control of the server on the hardware side. We could ask them to add additional space to the /var, though my manager might shoot that down as we do have a lot space in a /u01 partition. I was thinking that just putting it in a different location would be the best idea, I thought about sym links, though I am trying to figure out the best way to do this.
-Doron
Re: Changing MySQL Default location?
Posted: Tue Nov 05, 2013 5:15 pm
by abrist
Do understand that moving the db to a network share may adversely affect your install if the network storage cannot keep up.