Bug #27259 If --defaults-file option is absent, MA can't find configuration file
Submitted: 19 Mar 2007 13:13 Modified: 27 Apr 2007 8:08
Reporter: Craig Holmquist Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.10 OS:Windows (Windows)
Assigned to: CPU Architecture:Any
Tags: regression

[19 Mar 2007 13:13] Craig Holmquist
Description:
If the MySQL Server service is installed such that it doesn't start with a --defaults-file command-line option, MySQL Administrator gives the following error message:

"Either the server service or the configuration file could not be found. Startup
variables and service section are therefore disabled."

This option isn't required since MySQL Server will use certain configuration files by default.  If MA is run in service-configuration mode, it seems to be able to identify which options file the server is using and can modify it.

If this is intentional, it should at least be mentioned in the error message or in the MA manual.

This was observed using server version 5.0.33 and MySQL Administrator 1.2.10. I presume the MySQL Configuration Wizard always installs the service with this option, so this isn't an issue if that's how the server is configured.

How to repeat:
1. Run "mysqld-nt --remove" to uninstall the service if it is installed.
2. Run "mysqld-nt --install" to install the service (no other parameters).
3. Attempt to connect to server with MySQL Administrator.

(This was also confirmed with mysqld-max-nt.exe.)

Suggested fix:
Either:

(A) Change MySQL Administrator so it will look at the default configuration file paths if the server is not installed with --defaults-file

or

(B) Update the error message text and the manual so this requirement is mentioned.
[19 Mar 2007 14:30] MySQL Verification Team
Thank you for the bug report.
[29 Mar 2007 19:53] Todd Farmer
An associated server installation bug prevents there from being a useful workaround:

http://bugs.mysql.com/bug.php?id=27535

While you can define the --defaults-file option when installing the service, the resulting executable path has the quote around the entire name-value argument, as opposed to the format the Windows installer uses (and it appears MySQL Administrator expects), where only the value is quoted.
[27 Apr 2007 8:08] Mike Lischke
Unfortunately, we cannot fix this behavior because the entire config file handling is very difficult due to the way the server handles this. Additionally, there is no way to ask a server what config file it uses so we can only rely on a certain behavior, which usually works very well: specify the config file on the command line (in the service).