I have a server that seems to be setup wrong by previous administrator..
The server has two disks, disk 0 which is the operating system (RAID1 clone) disk 1 which is 3 drives in a RAID5 setup with battery backup cache raid controller.
They installed the datadir to disk0 (c:\programdata\mysql
) when it was supposed to go to disc1 (e:\programdata\mysql
) and under the RAID5 setup for obvious reasons.
If I change the data directory, what do I need to consider? My current thought process is to copy the data over to the E:\ (E:\programdata\mysql
) and just change the datadir variable to e:\programdata\mysql
I am basically looking for answers as to what I need to consider and what issues I am going to encounter in this move.
It's a safe move. Shutdown the mysql dameon and copy the database dir to another disk (it doesn't matter storage topology), then you should modify mysql config, restart mysql daemon and go live. This is a raw backup / migration and it's the safest way to get a snapshot of your database.
For your security you can make a data dump for your databases using mysqldump.