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

When installing MySQL 5.1 on a Windows machine, is it possible to specify where the Data Folder should go? The installer doesn't give an option for changing the Data Folder location, it defaults to "C:\Document and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\".

I'm installing MySQL 5.1.34 on Windows Server 2003.

Follow-up: I ended up manually editing my.ini and pointed datadir to the desired location. I just wish the installer had an option to change the location.

share|improve this question
I added some notes re: transforming the setup MSI in my answer. – Evan Anderson Jun 23 '09 at 18:30
up vote 0 down vote accepted

Yes. Have a look at this document:

You can specify the data folder either in an option file, or on the command-line for the service.

Edit: I just pulled down the MSI and had a look, and I don't see any way to specify the data directory during install w/ an addt'l property on the command line.

You can transform the install with Orca, if you are familiar with Windows Installer, to change the "DataDir" location in the Directory table.

share|improve this answer

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.