MySQL quiet installation references wrong executable

I am trying to install MySQL 5.5.27 (latest) quietly from the Windows (XP) command line via batch file using the MSI method. Following the directions on the MySQL site, I simply do this:

msiexec /i /quiet mysql-5.5.27.msi

Things install fine, but the Windows service will not start. The reason is obvious, but I can't figure out the solution. When I look at the service properties, the path to executable is:

C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld-nt

But it is supposed to be:

C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld

I've tried using sc to uninstall and re-install the service with the proper name, but I can't get around timeout error 1053. When I run the full blown installer, this problem does not occur. Can someone help?


Solution 1:

This is a perfect example of why I really hate using MSIs for MySQL Installations in Windows. You just can't know what's wrong until it's too late. It's like getting hit by an arrow.

To cut to the chase, mysqld-nt.exe was an old version of mysqld that was capable of handling NamedPipes and SharedMemory within the Windows Environment. That was back in the early days of MySQL 5.0. That binary executable was removed and you found out in the release notes of its discontinuance. Apparently, someone decided to leave that executable name in the MSI definition.

You could try the following:

cd C:\Program Files\MySQL\MySQL Server 5.5\bin
copy mysqld.exe mysqld-nt.exe

and rebooting Windows to see if MySQL can be fooled into executioning.

If this mysqld-nt.exe trick fails, not to worry.

I devised a plan to install MySQL using the No-Install ZIP file. Please see my plan from Feb 10, 2011 in ServerFault.