Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is it possible to have two databases hosted on a single MySQL instance, but have the files stored in two different physical locations?

For example:

db1 stored in: C:/ProgramData/MySQL/MySQL Server 5.1/Data/

db2 stored in: E:/MySQL/MoreData/

I know there's a datadir setting in my.ini that specifies where to store databases by default. Is there any way to override this at the database level?

I suppose I could use shortcuts, but is there a built-in way to do this in MySQL?

share|improve this question
up vote 8 down vote accepted

Use symbolic links, or in your case, the MySQL workaround for Windows, the .sym file.

share|improve this answer
That's exactly the link I needed. Thanks! – Rob Sobers Jul 7 '10 at 14:57

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.