Bug #49809 mysqld -- install fails again
Submitted: 18 Dec 2009 19:34 Modified: 7 Dec 2016 19:55
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.41 OS:Microsoft Windows (7 - 64 bit)
Assigned to: CPU Architecture:Any
Tags: qc, regression

[18 Dec 2009 19:34] Peter Laursen
Description:
report created with reference to earlier reports:
http://bugs.mysql.com/bug.php?id=46917
http://bugs.mysql.com/bug.php?id=46870

1) first point: run cmd.exe as administrator: 
C:\my server\bin>mysqld --install mysqlbug --defaults_file="c:\my server\my.ini"
 --datadir="c:\my data"

.. and absolutely nothing happens (file paths are valid of course - all files that need to be are there). The command just exits - no service created and no service registry entry. Even no error - and no message "service create successfully". The server used here is mysql-noinstall-5.1.41-winx64

2) second point:
Note the paths "c:\my server\my.ini" and "c:\my data". Note the SPACE character in path. That was actually what I wanted to test.  I have been waiting for reply to my comment in  http://bugs.mysql.com/bug.php?id=46870
"but please still consider if I install to a path with SPACE or have configuration in such ("c:\my folder"). Doesn't this require "quoted" file paths?" 
.. but this this now seems broken again and testing the bug fix for the registry key format is not possible.

How to repeat:
See above.

Suggested fix:
1) Make 'mysqld --install' work again 
2) and ALWAYS "quote" file paths in registry keys.
[18 Dec 2009 20:58] Peter Laursen
ok .. I made a mistake .. I cannot use --datadir swithc here.  Now I added to datadir spech my.ini

c:\my server\bin>mysqld --install mysqlbug --defaults_file="C:\my server\my.ini"
Service successfully installed.

so far so good.  But service won't start.  Registry key reads 

"c:\my server\bin\mysqld" --defaults_file="C:\my server\my.ini" mysqlbug

.. let me try to reboot.
[18 Dec 2009 21:08] Peter Laursen
reboot .. trying to start service. Error log:

091218 22:05:29 [Note] Plugin 'FEDERATED' is disabled.
091218 22:05:30  InnoDB: Started; log sequence number 0 44233
091218 22:05:30 [ERROR] c:\my server\bin\mysqld: unknown variable 'defaults_file=C:\my server\my.ini'
091218 22:05:30 [ERROR] Aborting

091218 22:05:30  InnoDB: Starting shutdown...
091218 22:05:31  InnoDB: Shutdown completed; log sequence number 0 44233
091218 22:05:31 [Note] c:\my server\bin\mysqld: Shutdown complete

Is it me going nuts only??
[22 Dec 2009 10:46] MySQL Verification Team
Thank you for the bug report.

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd\dbs

C:\dbs>sc qc mysqld51 | findstr defaults
        BINARY_PATH_NAME   : C:\dbs\5.1\bin\mysqld --defaults-file=c:\dbs\files\my.ini mysqld51

C:\dbs>net stop mysqld51
The mysqld51 service is stopping.
The mysqld51 service was stopped successfully.

C:\dbs>5.1\bin\mysqld --remove mysqld51
Service successfully removed.

C:\dbs>5.1\bin\mysqld --install mysqld51 --defaults_file=c:\dbs\files\my.ini
Service successfully installed.

C:\dbs>net start mysqld51
The mysqld51 service is starting.
The mysqld51 service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

091222  8:38:24 [ERROR] C:\dbs\5.1\bin\mysqld: unknown variable 'defaults_file=c:\dbs\files\my.ini'
091222  8:38:24 [ERROR] Aborting

C:\dbs>5.1\bin\mysqld --remove mysqld51
Service successfully removed.

C:\dbs>5.1\bin\mysqld --install mysqld51 --defaults-file=c:\dbs\files\my.ini
Service successfully installed.

C:\dbs>net start mysqld51
The mysqld51 service is starting.
The mysqld51 service was started successfully.

C:\dbs>
[6 Jan 2010 20:19] Peter Laursen
Omer's criteria for classification of severities always was a complete mystery to me!  This is 'denial of service' and is actually S1 according to official guidelines!
[7 Dec 2016 19:55] Yngve Svendsen
This relates to EOL (no longer supported) versions of MySQL Server. Thus closing.