Bug #22431 MySQL Administrator improperly updates my.ini when modifying logging information
Submitted: 18 Sep 2006 6:05 Modified: 27 Oct 2006 14:59
Reporter: Lee Clemens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.2.4 rc, 1.2.3 rc OS:Windows (Windows XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any

[18 Sep 2006 6:05] Lee Clemens
Description:
When editing the Log files tab information and Log Group dir on the InnoDB Parameters tabs, MySQL Administrator improperly updates the registered my.ini file.

The information should be added in the [mysqld] group, but it is added (once for each time you update, it does not clean itself) in the [mysql] group and subsequently no log files are generated. After manually moving these entries to the [mysqld] group, logging works fine.

I am using MySQL Administrator 1.2.3 RC and MySQL Server 5.0.24a on Windows XP SP2.

How to repeat:
Install MySQL Server and Administrator, edit log file options through Administrator and verify my.ini is not updated correctly; log file entries are added in the [mysql] group, not the [mysqld] group.
[18 Sep 2006 11:02] Valeriy Kravchuk
Thank you for a problem report. Please, specify exact OS used used and send (initial) my.ini file used. In my case, on XP, new rows (comment and innodb_log_group_home_dir=...) are correctly added at the end of [mysqld] section.
[19 Sep 2006 4:42] Lee Clemens
Hello,

The OS being used by MySQL Server and MySQL Administrator is Windows XP SP2.

I do not have a copy of the original my.ini file, but I did not make any changes to it before attempting to add the log files through MySQL Administrator. The Option file had always been set to my.ini.

It may be useful to know that the settings appear disabled in MySQL Administrator. The icons to the left of the Activate Logging fields have a red 'x' and the fields are read-only. I clicked the icon, modified the fields and pressed Apply changes. I also modified the field, clicked the icon to make the field read-only again and then press Apply changes. These both had the same affect, the settings were added to the [mysql] group, not the [mysqld] group.

After fixing the settings in my.ini and confirming it is logging correctly, the values in MySQL Administrator for Log files still appear blank and read-only. The setting for Log Group Dir on the InnoDB Parameters tab has always read, "C:\Program Files\MySQL\data", regardless of the settings in my.ini or modifications through MySQL Administrator. No files appear in that directory.

Other settings that were incorrectly modified in my.ini include:
log=[file path]
log-error=[file path]
log-bin=[file path]
log-slow-queries=[file path]

The values were correctly set, but placed in the wrong group.

Also, MySQL Server is not installed on the C: drive and I am using MySQL Administrator from the no-install package. Everything is otherwise functioning normally.
[2 Oct 2006 16:15] Kathy Mazur Worden
I've reproduced this on Windows XP Professional SP2 using MySQL Administrator 1.2.3 rc.  If I turn on any of the logging options using the Log Files tab under Startup Variables the variables are added to the [mysql] section in my.ini instead of the [mysqld] section.   When the variables are in the incorrect section clients cannot login via mysql command line.  If the variables are moved to [mysqld] the requested logs are generated but each log option is still greyed out in MySQL Administrator.
[13 Oct 2006 14:22] Valeriy Kravchuk
Please, try to repeat with a newer version, 1.2.4 rc, and inform about the results.
[13 Oct 2006 21:34] Lee Clemens
Using MySQL Administrator 1.2.4rc and a valid my.ini file, I clicked on the Log files tab and none of the log file values were displayed. I enabled the Query Logfile Name field and entered a valid path and filename. The value appears in red. I clicked Apply Changes and opened my.ini file. The new file path was in [mysql] instead of [mysqld]. The correct values (manually entered previously) were still under [mysqld].

Since the log file values are still not displayed in MySQL Administrator, and any value entered is still erroneously added to my.ini under [mysql], I don't see any change in this new version.
[17 Oct 2006 13:50] Kathy Mazur Worden
Same problem in 1.2.4c.  Log entries are added to [mysql] section instead of [mysqld].

Sample:
-------------------------------
[mysql]

default-character-set=latin1
...
#Enter a name for the error log file. Otherwise a default name will be used.
log-error

[mysqld]...
[27 Oct 2006 14:59] Mike Lischke
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[27 Oct 2006 21:23] Michael G. Zinner
The last comment was wrong. The bug is fixed in the new MA 1.2.5 rc which will be part of the MySQL GUI Tools for 5.0 R5 bundle that will be released on Monday.

Sorry for the inconvenience.