Bug #60033 Can't create test file C:\ProgramData\MySQL\....\lower-test
Submitted: 9 Feb 2011 4:34 Modified: 1 Mar 2011 5:17
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.5.9 OS:Windows (6.1)
Assigned to: CPU Architecture:Any
Tags: Can't create test file C:\ProgramData\MySQL\....\lower-test, qc

[9 Feb 2011 4:34] Jared S
Description:
mysqld fails with warnings and errors upgrading from 5.1.50 to 5.5.9.

Can't create test file C:\ProgramData\MySQL\....\lower-test

How to repeat:
Install 5.5.9 and configure on Win7x86.
[13 Feb 2011 22:48] Jared S
Workaround: Modified my.INI

datadir="C:/Program Files/MySQL/MySQL Server 5.5/Data"

Windows 7 wasn't allowing writes to ProgramData folder, mysqld was retruning OS error 5 on 'Open' comamnd.
[14 Feb 2011 13:37] MySQL Verification Team
You wrote:

"Windows 7 wasn't allowing writes to ProgramData folder, mysqld was retruning OS error 5 on 'Open' comamnd."

The above was with Install Administrator Privileges?. Thanks in advance.
[14 Feb 2011 21:52] Jared S
Yes I am an Administrator.  However you can't force MSI to ran as Adminstrator.  InnoDB can created ib_logfile1 however InnoDB can't Open ib_logfile1 in \ProgramData.
[1 Mar 2011 3:24] Jared S
Re-installed Win7 issue is resolved.
[1 Mar 2011 4:15] Valeriy Kravchuk
So, can we assume that this problem was not a result of any bug in MySQL code?
[1 Mar 2011 5:17] Jared S
Yes - Closed.
[13 Nov 2012 22:45] Brad Baker
I am also experiencing this issue on mysql-5.5.28 x64 on a windows server 2008 R2 system. In my case rebuilding the server did not help. Any ideas on why this would be happening or how I can debug it?
[14 Nov 2012 1:12] Brad Baker
I figured out what causes this issue. Steps to reproduce:

1) Run a custom install
2) Do not install "Server data files" (this presumably creates the C:\programdata\mysql\mysql server 5.5" directory)
3) Run the MySQL Server Instance Configuration Wizard

You'll get the error mentioned in this particular bug in your windows event log and the configuration wizard.

The solution is to uninstall and/or re-run setup and install the "server data files" then the configuration wizard will run to completion.

Hope this helps someone out there!
[5 Dec 2012 22:15] Justin Kalis
The question is how do you install this custom and direct the data folder to another location prior to install?

I am looking for some command line options which can be run via administrator CLI aka CMD command in Windows 2008R2.

The goal is to be able to install MySQL 5.5 or newer to D:\MySQL and this includes the data folder. As it stands now with default installation using custom you can specify the program installation dir/folder but the data forces itself to C:\ProgramData\MySQL..\.. and we don't want this because we use images to maintain system configuration and force all applications to the D partition or drive and this allows us to recover a server when there are issues much easier because we can leave the D drive alone and re-image from Acronis.

Many times MS OS patches hose a server and even rolling them back never restores the server to it's previous state so there is value in this type of configuration for all.

Another BIG reason providing an option to install MySQL on drives other than C drive is because MS has a folder which tremendously bloats over time called the winsxs folder located in C:\Windows\System32\winsxs and it can fill up a C drive quickly due to applications and patches getting installed sometime forcing a rebuild of a server since there is no way to purge this. 

The developers of MySQL could do us all a favor and provide a field to specify the data folder or publish the command line options to force the data folder to another location other than C: 

Thanks, 

JK
[2 Nov 2017 20:04] Brian Coverstone
I can't believe this issues was just closed.  It's had me going in circles for an hour.  It's things like this that ruin the MySQL experience.