Colin Charles Agenda

HOWTO: MySQL and Windows Vista to play nice

I first decided to try how things were in Windows Vista land, the moment I was told during a talk of mine that MySQL refused to install on Vista. I gave it a twirl (after disabling User Account Control – UAC) and found that I got a rather quaint error message from the MySQL Server Instance Config Wizard (MySQLInstanceConfig.exe) [this after it failed to start once the installer was complete]:

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details.

I hopped over to the event log (Event Viewer), and the error displayed was:

Activation context generation failed for "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe".Error in manifest or policy file "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe" on line 6. The value "asAdministrator" of attribute "level" in element "urn:schemas-microsoft-com:asm.v1^requestedPrivileges" is invalid.

I then thought, that the best solution was to launch it manually. I tried:
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe

via cmd.exe, and lo and behold, it all just worked!

For a more permanent solution, look at Resource Hacker, and read the instructions in this forum post.

It turns out, this is largely related to mysql#30823. There is a problem with the software manifest, that doesn’t allow MySQLInstanceConfig.exe to run in Vista. This sadly affects MySQL 5.0.51a (refer to mysql#34340), and the hope is that the next release fixes this (the documentation has already mentioned that 5.1.24-rc should have this fixed, and 6.0.x will get a push soon.)

In other news? If you haven’t seen MySQL on Windows: Configuration and Install, take a look. Its from Microsoft’s Port25 website (i.e. the open source group within Microsoft). I was truly impressed/shocked when I came across it. I especially like the note: “This paper represents testing and documentation in a lab environment. User Account Control (UAC) is an essential security component to Windows and Microsoft does not recommend turning off UAC in production environments.” Sorry, UAC and MySQL just do not jive (though it seems to be OK, once the installation is compelte – i.e. you can enable UAC again).

Technorati Tags: , , , , , ,