Bug #10140 Upgrade with Windows installer fails when datadir is on different drive
Submitted: 25 Apr 2005 10:21 Modified: 31 Mar 2014 9:24
Reporter: Stefan Hinz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.0 (but probably 4.1 too) OS:Windows (Windows 2000/XP)
Assigned to: CPU Architecture:Any

[25 Apr 2005 10:21] Stefan Hinz
Description:
When upgrading an existing installation which is in the default installation directory (%PROGRAMFILES%\MySQL\MySQL Server 5.0) but which has its data directory on a different drive (e.g. I:\MySQL Datafiles\5.0) the Windows installation wizards fail at the point where they try to access the datadir. That is, stopping the MySQL service works, but then the installer stops with an error that is, by the way, misleading: "Error 1317.An error occurred while attempting create the directory C:\Programme\MySQL\MySQL Server 5.0\data" is diplayed if there is a (dummy) data directory, and "Error 1303.The installer has insufficient privileges to access this directory: C:\Programme\MySQL\MySQL Server 5.0\data. The installation cannot continue. Log on as an administrator or contact your system administrator." is displayed if there is no dummy data directory. Particularly the latter error can be a real time-waster.

How to repeat:
Install MySQL 5.0. Move the datadir to another drive. Try to upgrade to a newer version using the installation wizard.

Suggested fix:
Read the contents of <installdir>\my.ini (or whatever other file is specified as --defaults-file with the MySQL service). At least, read the line that specifies datadir. ;-)
[25 May 2005 13:25] Wessel Koornstra
I found out that, even if I changed the data directory in the Instanceconfigurator that didn't work. I'm using a non-default data-dir. After changing the line in my*.ini to the right directory he flawlessy started and it works.
This didn't happen in earlier versions of MySQL.

Regards,

Wessel
[24 Sep 2005 18:49] Peter Laursen
I think you should just cancel the configuration wizard (uncheck the box) when installing over an older version.  There is nothing to configure.  You are configured!

I have my datadir on :D\mysqldb5 and I never had problems when doing as above.

Maybe the installer should have an option "use old configuration file" or something like it.
[31 Mar 2014 9:24] Yngve Svendsen
Posted by developer:
 
Thank you for the bug report. We are closing this report now for two related reasons:
* MySQL Server versions 4.1 and 5.0 are obsolete.
* For recent MySQL Server versions, the config wizard is no longer available, and the MySQL Installer for Windows is the recommended way to install MySQL Server on Windows.