Moving the MySql Database to D: drive

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
robocp01
Posts: 28
Joined: Mon Sep 21, 2009 3:59 pm
Location: Chalottesville, Va.

Moving the MySql Database to D: drive

Post by robocp01 »

I used the all inclusive Windows Installer to get Cacti running on my Windows 2008 server. Works really well. Do you know how difficult it will be to physically relocate the location of the MySql database. I think I understand how to relocate it, but what will break in Cacti and how do i modify it.

I would like physically move the location of the SQL database to our D:partition not have it on the C:drive.

Any help would be appreciated.

We have the application running in a test environment only, not currently in production.
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

Don't you have to modify MYSQL config (my.cnf) file?

Cacti (running on Linux / UNIX) has mysql info in global.php in include directory, which contains mysql info, but it does not contain "location" info of where your database physically resides.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You do realize it's the RRD files which consume the most space, not the cacti mysql db, right? I'd suggest NTFS junction points if you require the \cacti\rrd\ folder moved.

Anyways, backup the \mysql\bin\data\ folder and my.ini. Uninstall mysql and the reinstall it where you want. Restore the \mysql\bin\data\ folders and my.ini. Edit my.ini various paths to reflect the new locations.

Zero modifications to the cacti files are required.
robocp01
Posts: 28
Joined: Mon Sep 21, 2009 3:59 pm
Location: Chalottesville, Va.

Post by robocp01 »

No I did not but I do now! Thanks for the information. Then another question should I be concerned about the growth of the RRD files if I were to allow them to reside on say a 32 gig data partition. It appears from previous postings that the data stays relatively small even if I want to monitor say 300-1000 devices.

I'm going to assume then that it's not a big concern.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You need to do some reading on rrdtool / rrd files. They never grow once created. Conversely, if you increase the data retention levels of the rrd files past the cacti defaults, then the files will be larger...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests