Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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


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.