Bug #70398 MySQL Installer installs service with 'forward slashes' in registry
Submitted: 22 Sep 2013 21:39 Modified: 19 Nov 2013 22:46
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.7.2/5.6 OS:Windows
Assigned to: CPU Architecture:Any

[22 Sep 2013 21:39] Peter Laursen
Description:
Here http://bugs.mysql.com/bug.php?id=69878 i added today "Besides the 5.6.14 integrated installer destroyed my 5.7.1 isntallation in an attempt to upgrade it to 5.7.2 (and further mysql-installer-community-5.7.2.0-m12.msi cannot configure the service so that it will start - not even after uninstalling 5.7 and also after uninstalling the installer itself. "

I noticed that unlike the registry keys I have in HKCS\System\CCS\Services for 5.0, 5.1, 5.5 and 5-6 services the key used 'forward slashes' (not 'backslashes' in filenames/paths.

This could very well explain that the configurator could not configure teh service and even after manually crating a valid my.ini the service will not start.

The registry key exported and opened in Notepad reads

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MySQL57]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,43,00,3a,00,2f,00,50,00,72,00,6f,00,67,00,72,00,61,00,\
  6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,2f,00,4d,00,79,00,53,00,51,00,4c,\
  00,2f,00,4d,00,79,00,53,00,51,00,4c,00,20,00,53,00,65,00,72,00,76,00,65,00,\
  72,00,20,00,35,00,2e,00,37,00,2f,00,62,00,69,00,6e,00,5c,00,6d,00,79,00,73,\
  00,71,00,6c,00,64,00,22,00,20,00,2d,00,2d,00,64,00,65,00,66,00,61,00,75,00,\
  6c,00,74,00,73,00,2d,00,66,00,69,00,6c,00,65,00,3d,00,22,00,43,00,3a,00,5c,\
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,44,00,61,00,74,00,61,00,5c,00,\
  4d,00,79,00,53,00,51,00,4c,00,5c,00,4d,00,79,00,53,00,51,00,4c,00,20,00,53,\
  00,65,00,72,00,76,00,65,00,72,00,20,00,35,00,2e,00,37,00,5c,00,6d,00,79,00,\
  2e,00,69,00,6e,00,69,00,22,00,20,00,4d,00,79,00,53,00,51,00,4c,00,35,00,37,\
  00,00,00
"DisplayName"="MySQL57"
"ObjectName"="NT AUTHORITY\\NetworkService"

How to repeat:
I did not have more time and removed everything the installer had touched and installed using 'mysql -install' instead, so I don't have more information to provide.  I needed the server and could not spend more time with this. 

MySQL 5.7.1 worked OK - but after the attempt by mysql-installer-community-5.6.14.0.msi to upgrade it, it would not work and a fresh install with mysql-installer-community-5.7.2.0-m12.msi was not possible due to http://bugs.mysql.com/bug.php?id=70387

I am a little bit unsure now if it was mysql-installer-community-5.6.14.0.msi or mysql-installer-community-5.7.2.0-m12.msi who created/modified this registry key to use 'forward slashes' (but I believe it must have been mysql-installer-community-5.6.14.0.msi according to description above).

Suggested fix:
Drop the stupid "MySQL Installer"!
[22 Sep 2013 21:40] Peter Laursen
registry key as a binary file (zipped) - note 'forward slashes'

Attachment: 57.zip (application/zip, text), 634 bytes.

[23 Sep 2013 8:25] Valeriy Kravchuk
I've got the same problem on 64-bit Windows XP, and there there was no 5.6.14 (just MySQL 5.5 was upgraded to 5.5.33 using installer, and it works). Forward slashes are used in the path to executable defined for the service, and this does not let it start, surely...
[23 Sep 2013 13:03] MySQL Verification Team
Image path with forward slashes

Attachment: service_image_path.png (image/png, text), 12.96 KiB.

[23 Sep 2013 13:05] MySQL Verification Team
Thank you for the bug report.
[23 Sep 2013 13:12] Peter Laursen
How can you make this "D4 (Minor)" only?  It prevents the service to start. Windows cannot resolve a filepath with (mistaken) 'forward s/ashes'.

This is "S1" according to offical guidelines here ("denial of service"). It is a SERIOUS bug!

The file path to the server executable *NEEDS TO* use 'backs\lash'.  In the --defaults-file it may not matter if forward slashes or backslashes are used because this is handled by the MySQL server and not the Windows OS (but still for compliance with the OS also this should be backslashes).
[23 Sep 2013 15:24] MySQL Verification Team
Peter on my side service started please see picture added.
[23 Sep 2013 15:24] MySQL Verification Team
Service started

Attachment: service_started.png (image/png, text), 135.20 KiB.

[23 Sep 2013 15:26] MySQL Verification Team
Anyway I will test on Win8 prior pictures was done on Vista.
[23 Sep 2013 17:53] MySQL Verification Team
Windows Service Running even with forward slashes

Attachment: forward_slashes_and_running_win7.png (image/png, text), 273.92 KiB.

[23 Sep 2013 17:59] MySQL Verification Team
@Peter

Now checked on Windows 7 64-bits too. You can notice in the screenshot prior added that indeed the service image path has forward slashes also you can notice the service is running checked with Control Panel->Services and sc command line.
So I assume another factor is making your service to fail the start but not the forward slashes how you think. Thanks.
[23 Sep 2013 18:14] MySQL Verification Team
The forward slashes exist on 5.6 too.
[19 Nov 2013 22:46] Philip Olson
Fixed as of the upcoming MySQL Installer for Windows release, and here's the changelog entry:

  Forward slashes were used in the executable path that was defined 
  for the Windows service. These are now back slashes.

Thank you for the bug report.