Bug #14649 MySQLInstanceConfig.exe fails when writing configuration file
Submitted: 4 Nov 2005 16:49 Modified: 4 Jul 2007 1:18
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.15-GA , 4.1, 5.0.30 OS:Windows (Win2K3 Server x64)
Assigned to: CPU Architecture:Any
Tags: bfsm_2006_12_07

[4 Nov 2005 16:49] Mark Leith
Description:
MySQLInstanceConfig.exe fails with the following error (from the instance configuration log file) when trying to write the my.ini file:

Configuration file template C:\MySql5\my-template.ini could not be processed and written to C:\MySql5\my.ini. Error code -1.

How to repeat:
Try to install 5.0.15-GA on a Windows 2003 Server 64bit operating system.
[10 Nov 2005 18:45] Kfir Itzhak
Same problem here. Windows NT 4.0 Server, Service Pack 6a.

It happens when trying to install as Server or Dedicated Server machine. When trying to install as a Developer machine, it works just fine.

I've had MySQL 4.1.8 but wanted to upgrade to MySQL 5 (5.0.15, the latest) and this bug got me.. So i tried to get the latest version of the 4.1 branch, which is 4.1.15 i believe, Same problem!!! 

So i returned to the version i had before trying to upgrade, 4.1.8 version and everything works again.

NOTE: When i say upgrade, I mean full uninstall + remove the directory and then an install of the desired version.
[22 Nov 2005 17:07] Jorge del Conde
I was able to reproduce this under WInXP64
[12 Jan 2006 11:52] Imad Tb.
same problem when trying to install version 5.0.18 on a Windows 2003 Server 64bit
[12 Jan 2006 19:13] Jeff Schuler
I had the same error message with 5.0.18 on a win2k3 x64 server.  However when I redid the config as a developer machine it worked fine.
[22 Jan 2006 9:00] Jason Caley
Confirmed here too. Running W2K3 x64 Enterprise.

FWIW, backed up my.ini file from prior config, let it run as developer then replaced my.ini as required (from a 32bit system)

Problem appears to be in the template write routine. I see it's assigned anyway.
[24 Feb 2006 9:04] [ name withheld ]
Same again here, W2K3/64 Standard installing 5.0.18...
[24 Feb 2006 23:09] Bruce Link
Still failing, obviously.  Running Windows 2003 server, fully patched.  Tried to configure with server config and failed.  Dropped back to development config and succeeded.  Tried varous locations for files, character encoding, no difference.

I would raise the severity, since it makes no sense running a server as development machine.  The documentation indicates to use the configuration tool rather than tweeking the config files by hand.
[2 Mar 2006 16:55] Tobias Sager
I see this with Server Instance Config 1.0.8 from 4.1.18.
[4 Apr 2006 7:06] Christian Goesswein
Also confirmed on 5.0.19 on WinXP 64bit
[26 Apr 2006 5:01] James Day
A workaround is described in the first reply to http://forums.mysql.com/read.php?11,81185,81185#msg-81185 .
[12 Aug 2006 13:55] Tristan Aubrey-Jones
Similar on WinXP64 when installing mysql-essential-5.0.24-winx64. Installation works ok but configuation fails. When I click Execute at the end of the Wizard it just puts a cross next to the 'Write configuration' and then stops. I would strongly recommend raising the severity.
[28 Aug 2006 18:29] Carlos Amengual
Still fails with 5.0.24. Installing win32 version works fine.

Tested with Windows XP Professional x64.
[25 Sep 2006 5:48] Christian Goesswein
5.0.24 x64 on Windows Server 2003 x64 still fails, too.

A workaround i used:
Install 32 bit version (e.g. c:\MySQL\) and after successful installation and configuration, stop the service and exchange/overwrite all files at C:\MySQL\ with the files from the 64 bit zip file ("Without installer" download) of the MySQL server. Then start the service and you have a running 64  bit MySQL server.
[12 Oct 2006 20:18] David Lane
S3 (Non-Critical)?  Come on guys.  This bug has been around for a year on x64-bit platform and it is still not fixed (I ran into it today, Windows 2K3 EE R2 x64)?  If this was a Linux system, I would fix it myself, but since I am forced to work on an Windows platform, it makes it a tough sell to the brass when I cannot install a simple database server becasue the install script is borked. Throw me a bone so I don't have to install SQL Sever.
[12 Oct 2006 20:22] David Lane
Sorry - forgot the rest of the details:  

Windows 2003 Sever Enterprise R2 X64 (patched) (dual-core PentiumD) 4 GB RAM.  MySQL-5.0.26-Win32.zip (x64 not available) downloaded 20061012.  Fails on anything other than "Developer" setting when writing the config file.
[12 Oct 2006 20:22] Mark Leith
Hi!

I've increased the severity to S2 now, as I agree, this bug has dragged for a little while now.

I'll get in touch with the people responsible for this to see if I can have it looked at again.

Best regards

Mark
[17 Oct 2006 21:41] [ name withheld ]
how about S1?

This thing is show stopper.

Still Fails mySQL 5.0.26
Windows XP x64 & Windows 2003 x64.
[13 Nov 2006 11:54] Ralf Neubauer
Some variable names in the my-template.ini are wrong, they differ from reality by a '_' prefix. You can look at the generated my.ini how far the template instanciation worked ok and fiddle with the variable names in the next line.

Unfortunately I have no backup of the original my-template.ini, but if memory serves right, I had to change line 157 from

_available_memory=<<<{:=[_memory]-[max_connections]*256K}>>>

to

_available_memory=<<<{:=[_memory]-[_max_connections]*256K}>>>

and similar in some more spots.

Strangely many of the values were calculated as zero (0), maybe the workaround does not help very much..
[24 Nov 2006 19:58] Chris Dahlberg
It really surprises me that this bug is STILL around, especially considering how simple I believe the solution is. MySQLInstanceConfig.exe is a 32-bit build, even in the 64-bit builds of MySQL. Simply include a 64-bit build of MySQLInstanceConfig.exe with the 64-bit builds of MySQL, and I would think this problem should be fixed.

A workaround:
Install the 64-bit build of your choosing. Rename the %installdir%\bin\libmysql.dll to libmysql_64.dll. Download the ZIP of the 32-bit build of the same version you are trying to install. Extract the bin\libmysql.dll from the ZIP file to %installdir%\bin. Run MySQLInstanceConfig.exe and complete the wizard. After that has finished, rename libmysql.dll to libmysql_32.dll and rename libmysql_64.dll back to libmysql.dll. Restart the MySQL service. Everything now works fine.
[11 Dec 2006 19:18] Louis Breda van
Hello,

This is not the first time, I complained about this bug which prevend normal installation on x64 systems (vista or w2k or xp). And to be honest I do not understand at all why such a serieus and easy reproducable bug is not fixed.  

I know the bug is raised in priority now, but it is still not clear to me if any one is working on it and for which release a fix is sceduled.

More in general I also wonder why e.g. the ODBC-driver is not available in a 64 bit version.

Louis
[12 Dec 2006 14:30] Mark Leith
Hi,

We have indeed given this a higher priority internally now, following an internal meeting. 

We hope to have a resolution for this soon.

Best regards

Mark
[7 Jan 2007 2:38] abe daroepi
Using mysql 5.0.27 (x86) on WinXP x64 with 3GB memory:

Processing of my-template.ini is halted at variable [MEMORY] when the value is truncated to signed int thus becoming negative if memory is >2GB.  This is a problem in SERVER and DEDICATED modes.

On my system, GlobalMemoryStatus gives total phys memory of 3220107264 bytes (under wow64), but the wizard outputs -1074860032 for <<{:[MEMORY]}>>.

Workaround is to edit my-templates.ini and use constants in place of [MEMORY].
[12 Jan 2007 14:32] Michael G. Zinner
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[22 Jan 2007 19:29] [ name withheld ]
I also ran into this same issue with my.ini right after installing MYSQL 5.0.27, and also with the 5.1.14 beta.

So I dunno how toget MYSQL on my machine other than building the file from source and I dont have Visual Studio.

I am running Windows XP Professional (regular 32bit), on a Dual Core 2 E6600 processor.

Am I stuck basically until next release? seems like alot of people with 64bit machines also have same trouble? It cant be true that MYSQL doesnt work on higher end machines, otherwise the world wide web would halt as we know it :) ?
[10 Feb 2007 18:13] Michael Berk
I experience the same issue on Windows Server 2003 Enterprise x64, attempting to install MySQL 5.1.15-beta.  "Configuration file template ... could not be processed and written to ....  Error code -1."

Looks like I'll have to do a 32-bit installation for now and upgrade later.
[4 Mar 2007 22:06] Dev
This bug is still there in 5.1.16-beta
Trying to install on win server 2003 x64. Also tried the libmysql.dll 32 bit workaround, and even that doesn't work.
It's pretty amazing that an installation bug like this still hasn't been fixed since it was first reported in 05.
[4 Mar 2007 22:24] Dev
a workaround is to select "developer machine" instead of "server" or "dedicated" during the configuration wizard setup. So it looks like the issue is related to the amount of installed ram maybe (our system has 4Gb)?
[5 Mar 2007 20:34] Valeriy Kravchuk
Michael, Dev,

Please, if you have 4+ GB of RAM, send my.ini file generated with any settings. You may have a different bug.
[25 Apr 2007 18:26] MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=22307 was marked as duplicate
of this one.
[25 Apr 2007 21:10] Chris Calender
Here is another work-around, if the previous ones have not worked for you.

01. Run Install Package
02. Do not run config wizard
03. Back up 64-Bit DLL
04. Replace "LibMySQL.dll" w/ 32-bit version
05. Run Config Wizard
06. Select "Developer Machine" during config 
07. Stop service after config
08. Replace 32-bit dll w/ 64-bit dll
09. Replace my.ini with dedicated server ini
10. Start Service

Be sure that you do not already have a service with the same name (that may have come from a previous attempted installation using the config wizard).
[15 May 2007 15:47] M H
The same problem with Vista 64 Bit and 4GB of memory.

I still can believe this bug is around since November 2006! MySQL seems to be not a database for real use only good for LAMP systems.
[23 May 2007 8:33] Valeriy Kravchuk
All reporters,

Please, upload my.ini file, if any, that was generated during installation.
[24 May 2007 17:32] Michael G. Zinner
Hi!

I have uploaded a fix for the problem but the fix needs to be verified on a real-world machine with more than 2GB of RAM.

Could somebody please download this zip and extract it to "C:\Program Files\MySQL\MySQL Server 5.0\bin" overwriting the existing MySQLInstanceConfig.exe

ftp://ftp.mysql.com/pub/mysql/download/gui-tools/MySQLInstanceConfig_bug14649.zip

Then launch the Configuration Wizard from the Windows Start Menu and try to run a reconfiguration using the SERVER or DEDICATED modes.

Thanks,
Mike
[1 Jun 2007 18:39] erik christensen
i tried the new MySQLInstanceConfig.exe in the zip file and got beyond the problem with failure to write the my.ini

started as a service OK then install crashed on failure to connect to localhost - error message said to check firewall - windows firewall is disabled

W2K3 SP2 - dual AMD opteron - 8 gig RAM
[1 Jun 2007 18:44] erik christensen
tried to to connect to mysql from the command line and got following failure message:

D:\programs\MySQL\MySQL Server 5.0\bin>mysql
ERROR 2017 (HY000): Can't open named pipe to host: .  pipe: mysql (2)
[1 Jun 2007 18:55] MySQL Verification Team
Mr. Erik,

Are you server started with named pipe enabled and skip-networking?
If yes see in the manual or mysql --help how to connect with named
pipes. Thanks in advance.
[3 Jun 2007 11:53] Darren Gay
Hi Mike,

Many thanks for the ZIP of the configurator! It worked 100% on a Win 64 Server with 8GB Ram!
[6 Jun 2007 11:38] Axel Schwenke
a duplicate of this one was reported as bug#28920
[6 Jun 2007 13:58] Axel Schwenke
The fixed Config Wizard worked for the customer from CSC issue 17125 as well! (this was Windows 2003 Server for EM64T/AMD64)

Mike - maybe you should release the fixed version now?
[23 Jun 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 Jun 2007 14:02] Michael G. Zinner
the fix has been pushed. It will not be in the version #enginnering is currently preparing for release but in the next.
[26 Jun 2007 17:14] Chris Calender
There is a single installer config wizard for all server versions so it will go into all versions (which will be 4.1.24, 5.0.46, and 5.1.21).
[4 Jul 2007 1:18] Paul DuBois
Noted in 4.1.24, 5.0.46, 5.1.21 changelogs.

On 64-bit Windows systems, the Config Wizard failed to complete the
setup because 64-bit Windows does not resolve dynamic linking of
the 64-bit libmysql.dll to a 32-bit application like the Config Wizard.
[5 Jul 2007 20:10] Brent Wong
The configurator in the zip worked great.  It Needs to be included ASAP.
[10 Jul 2007 10:58] Tonci Grgin
Bug#28397 was closed as duplicate of this one.
[11 Jul 2007 13:11] MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=29695 was marked as duplicate of
this one.
[16 Mar 2009 21:32] Bob Fields
Bug still exists in mySQL 4.1.22
[16 Mar 2009 22:43] Bob Fields
4.1.22 is the latest 4.1 version available for download, but there are release notes for 4.1.25 which includes this bugfix. Where is the download for that patch level? We are constrained to 4.1.x by the software using mySQL.
[16 Mar 2009 22:55] Chris Calender
The bug was fixed in 4.1.24, so it would be listed in those changelogs.

Also, note that "MySQL 4.1 is in its extended support phase. We no longer routinely provide security updates in this location. Security fixes for MySQL 4.1 are only made available through the source repository."

(from the 4.1 Community downloads page .. http://dev.mysql.com/downloads/mysql/4.1.html)

So, you would have to download the source and build mysql.

Note that we do have 4.1.25 binaries built for Enterprise customers, so subscribing to MySQL Enterprise is another option.

http://www.mysql.com/products/enterprise/features.html