Bug #70150 Incorrectly reports the active configuration file
Submitted: 26 Aug 2013 13:28 Modified: 21 Mar 2014 6:21
Reporter: Sam Abboushi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:6.0.6.11184 Community OS:Windows (W7 64)
Assigned to: CPU Architecture:Any

[26 Aug 2013 13:28] Sam Abboushi
Description:
Windows Service:
  Name: MySQL 56
  Path to Executable: SQL Server 5.6/bin\mysqld" --defaults-file="D:\Documents\MySQL\my.ini" MySQL56

Workbench:
  Local instance MySQL:
    System Profile:
      Configuration File: D:\Documents\Application Data\MySQL\my.ini

Workbench seems to always report the Configuration file specified in the instance System Profile regardless of whether it is the active configuration file.

Note that the paths to the configuration files are different above.

How to repeat:
Save a new configuration file in a location which is different from that specified in the Windows service.  Make sure the new configuration file has a different datadir path than the original configuration file being used by the Windows Service.

Set the Workbench System Profile Configuration File to the new configuration file.

Exit Workbench
Stop the Windows Service
Restart the Windows Service
Launch Workbench

In Workbench Navigator Pane, select Instance, Options File
Note that the Configuration File path is to the new configuration file

In Workbench Navigator Pane, select Management, Server Status
Note that the Data Directory path is to datadir specified in the original configuration file.  It appears that the configuration file specified in the Windows Service is the active one, NOT the configuration file specified in the Workbench System Profile.

Suggested fix:
Why is the configuration file path requested if the instance is relying upon a MySQL windows service?  I suggest that an option if given to select whether the instance will be configured to use a windows service and to just prompt for the Windows Service Name and for workbench to then retrieve the active configuration file from the running Windows Service.
[26 Aug 2013 13:32] Sam Abboushi
Severity: I was unable to access my database until I figured out this problem
[22 Jan 2014 13:36] Alfredo Kojima
This is not a bug. The path you configure in WB is the path that WB looks for the file, not the file that the server will be using. If you want to change where the server stores the config file, you must change the service definition first.
[22 Jan 2014 16:51] Sam Abboushi
The path you configure in WB is the path that WB looks for the file, not the file that the server will be using. 
>> Yes - that's my point.  So why would you want WB to look for a non-active configuration file?

>> If you want to change where the server stores the config file, you must change the service definition first.
No - that's not what I want: I want WB to correctly report the path to the active configuration file.

Maybe I am not understanding something here: since WB plays no role in determining which configuration file will be used by the MySQL service, then what is the benefit of WB storing a path to a configuration file, which may, as I demonstrated, be the path to a non-active configuration file?  And/or under what circumstances does it make sense to display the path to a non-active configuration file in WB?
[23 Jan 2014 18:14] Alfredo Kojima
There are several different situations where WB will have no idea where's the configuration file located. The case of a Windows service is the only one, actually. Because of that, it must be possible to edit the config file path. In Windows, if you let WB autodetect the local services, you don't need to edit the paths either.
[21 Mar 2014 6:21] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.3 release, and here's the changelog entry:

A new "Create Missing Local Connections" option was added to the
right-click context menu on the Home screen. It attempts to identify and
create connections to locally installed MySQL servers.

Thank you for the bug report.