Bug #7453 Multiple servers in Administrator not correctly supported
Submitted: 21 Dec 2004 11:31 Modified: 5 Jan 2005 15:58
Reporter: Jonathan martens Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.18 OS:Windows (Windows (XP SP2))
Assigned to: Assigned Account CPU Architecture:Any

[21 Dec 2004 11:31] Jonathan martens
Description:
It seems that the administrator doesn't control the service it is connected to, but controls the default 'MySQL' service.

Software:
MySQL Administrator 1.0.18
Windows XP SP 2
MySQL 4.0.16-max-debug

System:
Intel Pentium 4 2.00 Ghz, 248 MB RAM.

How to repeat:
I've installed a second MySQL server on my system by specifying a second server in the my.ini file. When I connect to the second server running on port 3316 the 'Server information' page displays that I am connected to my second MySQL service running on the 3316 port.

However the 'Service Control' displays that the controlled service is the other service by the name of 'MySQL' (the first/default one) and not 'MySQL2' which is my second server. 

It says the Display name is 'MySql' instead of 'MySql2'. 

It says it uses c:\windows\my.ini as configuration file which is correct, however the section name is 'mysqld' instead of 'MySql2' which is the section that specifies the second server parameters.

Under the 'Startup variables' it displays a greyed out port number, the value however is not 3316, but 3306, the port on which my first MySQL server is running.

When I switch back to the 'Server Information' window it suddenly displays the values for my first MySQL service the default one running on port 3306. So only at first login it displays the right values.

Suggested fix:
Let it control the correct server, the one you connect to in stead of the default server.
[24 Dec 2004 6:40] Thomas CORBIERE
I think this is a duplicate of this bug : http://bugs.mysql.com/bug.php?id=7273
[24 Dec 2004 8:22] Jonathan martens
I don't think it is the same bug as 7273, because when I hold the control button in the MySQL Administartor dialog I can indeed see both services, but they still use the 'mysqld' section. If I specify another section ('mysqld2') in the startup variables for the second server and press 'Apply' it still reverts to the default section when I switch to the first and than back to my second service.

Is still seems like a problem of the MySQL Administrator to me.
[24 Dec 2004 19:52] Thomas CORBIERE
Oh yeah, sorry, I misunderstood what you were saying.

But, it seems that what you are doing is wrong.
read carfully the window dialog box wher you can choose the section.
It says "the server will read the following sections if present. [mysqld], [server], [mysqld-x.x]".
Conclusion, you can't use "mysqld2" as section name for configuring the second server.
Read http://dev.mysql.com/doc/mysql/en/Server_options.html for more information about this.

By the way, I think wich sections the server will read in the config file is hardcoded because I didn't find any command line option that let you specify the section to be read bye the server.

The real bug may be that Administrator lists all section of the option file instead of listing only server-related sections.

Now about your problem.
If we read carfully the dialog box for choosing option file and section, it says "choose the configuration file to be edited", not to be used with the particular instance you are configuring.

So here's what I think.
When you click on Startup Variable then click on a service, fields are populated with the correct data for the choosen service.
Then if you click choose option file, fields will be populated with data from the choosen section from the choosen file and will have nothing to do with the current selected service.

In fact choosing a file in this dialog box doesn't change "--defaults-file=" in the command line used to start the entry. Since the dialog box said "file to be edited" I think that this is the normal behavior.
Again there may be a bug here as option file and section fields doesn't reflect what we are modifying since they aren't update when we are switching between services but only when using the choose option file dialog box.

To conclude, to me it's like your bug isn't a bug but a misunderstanding of a somewhat confusing dialog box.

Note : using seperates option file for each server helps understanding what I tried to demonstrate although it's not exactly what you've submitted.

I hope this will be helpful to you.
[27 Dec 2004 15:51] MySQL Verification Team
Thank you for the bug report.
[5 Jan 2005 15:55] Michael G. Zinner
Thomas, thanks for pointing out the facts.

Indeed, MySQL Administrator cannot deal with all possible ways you can configure a MySQL Server setup.

It will be possible when we introduce a tool called Instance Manager, which will be a seperate service, controling all your installed MySQL Servers.

What the MySQL Administrator can do at the moment is, to deal with installations done either through the Configuration Wizard during installation or if a instance is created using the Administrator.

In these cases, each instance has to use it's own config file. The --defaults-file="xxx" option will always be added to the Windows Service entries in the registry. That enables the MySQL Administrator to identify which config file to display.

In short, the MySQL Administrator cannot deal with setups that use a single config file for several instances automatically.

Therefore we added the posibility to choose the config file and the appropriate section manually, so you can still use the MySQL Administrator to work with such files.

If it is possible for your setup, i would highly recommend to create a single config file for each instance and add the --defaults-file="xxx" option to the Windows service entries. And delete the my.cnf in C:\ and my.ini in C:\Windows.

This has now become the recommended way to install several MySQL server instances on Windows because it results in a much clearer setup.

But like said before, as soon as we get the Instance Manager containing the functionality we need, the MySQL Administrator will talk to the Instance Manager and the multible sections in one config file should be solved also.
[5 Jan 2005 15:58] Michael G. Zinner
Thomas, thanks for pointing out the facts.

Indeed, MySQL Administrator cannot deal with all possible ways you can configure a MySQL Server setup.

It will be possible when we introduce a tool called Instance Manager, which will be a seperate service, controling all your installed MySQL Servers.

What the MySQL Administrator can do at the moment is, to deal with installations done either through the Configuration Wizard during installation or if a instance is created using the Administrator.

In these cases, each instance has to use it's own config file. The --defaults-file="xxx" option will always be added to the Windows Service entries in the registry. That enables the MySQL Administrator to identify which config file to display.

In short, the MySQL Administrator cannot deal with setups that use a single config file for several instances automatically.

Therefore we added the posibility to choose the config file and the appropriate section manually, so you can still use the MySQL Administrator to work with such files.

If it is possible for your setup, i would highly recommend to create a single config file for each instance and add the --defaults-file="xxx" option to the Windows service entries. And delete the my.cnf in C:\ and my.ini in C:\Windows.

This has now become the recommended way to install several MySQL server instances on Windows because it results in a much clearer setup.

But like said before, as soon as we get the Instance Manager containing the functionality we need, the MySQL Administrator will talk to the Instance Manager and the multible sections in one config file should be solved also.
[5 Jan 2005 20:43] Jonathan martens
Thanks for your reply, I will certainly use multiple configuration files as is recommended as you say, esoecially because of the fllowing.

When I open MySQL Administrator I have to connect to a certain server with the password for the server you connect to. I don't know if you would call it a bug, but IMHO it is. 

As I log in to my second MySQL server (port 3316) on my system it is now possible to change and view settings that are part of the configuration of my First MySQL server (default port 3306) which uses different databases/tables and passwords. If this won't be changed until the Instance Manager is released I can understand that, but I hope this is a point of concern to the people who are concerned with the development of the MySQL Instande Manager. 

I think using seperate configuration files will prevent this problem. Thanks again for the support.
[13 Mar 2014 13:33] Omer Barnir
This bug is not scheduled to be fixed at this time.