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

I am far from a DBA and have a question. Recently I installed MySQL. On my machine C:\ is a 50GB partition of two mirrored 10k SAS drives. The remaining space on those drives is allocated to D:. I also have a SSD mounted as E:. When I installed MySQL, I installed it to E:\ assuming that that is where the database information would be held since I had installed it there. I am now seeing C:\ProgramData\MySQL\MySQL Server 5.1\data\peq, peq being the name of my main database. Is my database being stored in C:\ and if so, how do I fix it to store the DB on the SSD?

share|improve this question

migrated from Apr 12 '10 at 19:07

This question came from our site for professional and enthusiast programmers.

You need to change the datadir in my.cnf Stop mysql, edit my.cnf, move your datadir to the new location, restart mysql, that should be it :)

share|improve this answer
please reformat! – lexu Apr 12 '10 at 20:03

Your Answer


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