Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
2  
Not familiar with MySQL on Windows but you'll also want to ensure that the user the mysql process runs as has access to the e:\programdata\mysql directory –  HTTP500 Nov 15 '11 at 19:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.