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.

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

1 Answer 1

up vote 0 down vote accepted

Yes. Have a look at this document:

http://dev.mysql.com/doc/refman/5.1/en/windows-create-option-file.html

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

 
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.