Bug #90383 | MySQL 8.0.4 RC don't read my.ini section with service name on Windows | ||
---|---|---|---|
Submitted: | 11 Apr 2018 9:38 | Modified: | 26 Oct 2018 15:05 |
Reporter: | Dominique Ottello | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Windows | Severity: | S2 (Serious) |
Version: | 8.0.4 RC/8.0.11/8.0.12 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | my.ini not read |
[11 Apr 2018 9:38]
Dominique Ottello
[11 Apr 2018 10:22]
MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug. Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/ Thank you for your interest in MySQL.
[11 Apr 2018 10:31]
Dominique Ottello
It's not support, it's a bug! The procedure as I described it works perfectly with all versions of MySQL including MySQL 5.7.21, but does not work with MySQL 8.0.4 RC while there was no problem with MySQL 8.0.3.
[11 Apr 2018 10:35]
MySQL Verification Team
Stop the server and then remove the service you created before. To read the my.ini create again the service as follows: mysqld.exe --install-manual wampmysqld64 --defaults-file=j:/wamp64/bin/mysql/mysql8.0.4/my.ini
[11 Apr 2018 16:37]
Dominique Ottello
I'm sorry, but even with your solution, the my.ini options file is still not loaded, so its directives are not taken into account and MySQL 8.0.4 RC works with all its default options.
[11 Apr 2018 16:45]
MySQL Verification Team
There are another MySQL service on the same machine, i.e: for 5.7.21?
[11 Apr 2018 18:09]
MySQL Verification Team
Open a command prompt. Be sure the service is stopped. Be sure that the basedir and datadir are correct in the my.ini file. Run the below command and print here the result: mysqld --defaults-file=j:\wamp64\bin\mysql\mysql8.0.4\my.ini --standalone --console
[11 Apr 2018 18:26]
MySQL Verification Team
I am getting the below error: D:\wamp64\bin\mysql\mysql-8.0.4>bin\mysqld --defaults-file=d:\wamp64\bin\mysql\mysql-8.0.4\my.ini --standalone --console mysqld: Can't change dir to 'd:\wamp6in\mysql\mysql-8.0.4\data\' (Errcode: 22 - Invalid argument [OS Error Code : 0x7b]) On my test the issue is: wamp64\bin\ which is parsed as wamp6in, so I guess the \bin folder is interpreted as backspace \b. Just want to see why you didn't see this error. Thanks
[12 Apr 2018 8:21]
Dominique Ottello
Hi, With my original my.ini file, there is: J:\wamp64\bin\mysql\mysql8.0.4\bin>mysqld --defaults-file=j:\wamp64\bin\mysql\mysql8.0.4\my.ini --standalone --console 2018-04-12T07:55:22.796498Z 0 [System] [MY-010116] J:\wamp64\bin\mysql\mysql8.0.4\bin\mysqld.exe (mysqld 8.0.4-rc-log) starting as process 6464 ... 2018-04-12T07:55:24.715301Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-04-12T07:55:24.746501Z 0 [System] [MY-010931] J:\wamp64\bin\mysql\mysql8.0.4\bin\mysqld.exe: ready for connections. Version: '8.0.4-rc-log' socket: '' port: 3306 MySQL Community Server (GPL). Ctrl-C to quit 2018-04-12T07:57:18.595501Z 0 [System] [MY-0010^7C7] J:\wamp 64\J:\wamp64\bin\mysql\mysql8.0.4\bin>bin\mysql\mysql8.0.4\bin\mysqld.exe: Normal shutdown 2018-04-12T07:57:19.687503Z 0 [System] [MY-010910] J:\wamp64\bin\mysql\mysql8.0.4\bin\mysqld.exe: Shutdown complete. --- Now, in my.ini file, I copy all directives from the [wampmysqld64] (name of the service) section under the [mysqld] section and restart the previous procedure As message is in French : "Arr+¬t normal du serveur" this means that my directive "lc-messages=fr_FR" is well taken into account. If now (leaving the copy of the [wampmysqld64] section in the[mysqld] section I run MySQL by starting the wampmysqld64 service, the log file (J:\wamp64\logs\mysql.log) is well filled: 2018-04-12T08:14:56.109759Z 0 [System] [MY-010116] j:\wamp64\bin\mysql\mysql8.0.4\bin\mysqld.exe (mysqld 8.0.4-rc) starting as process 8428 ... 2018-04-12T08:14:56.827360Z 0 [System] [MY-010931] j:\wamp64\bin\mysql\mysql8.0.4\bin\mysqld.exe: ready for connections. Version: '8.0.4-rc' socket: '' port: 3306 MySQL Community Server (GPL). My conclusion is that the my.ini file is loaded when starting MySQL by the "wampmysqld64" service, but that it is the directives in the [mysqld] section that are taken into account and not the directives in the service name section [wampmysqld64] contrary to what has always been done from mysql 5.1. to mysql 5.7.21.
[12 Apr 2018 11:49]
MySQL Verification Team
Thanks for the feedback. I was able to verify that actually the server 8.0 don't read the my.ini section with the service name like i.e 5.7.21 does, that's important when running several instances on same machine with only one my.ini. C:\mysql-8.0.4>type my.ini [wampmysqld64] basedir=c:\mysql-8.0.4 datadir=c:\mysql-8.0.4\data port=4040 C:\mysql-8.0.4>bin\mysqld --install-manual wampmysqld64 --defaults-file=c:\mysql-8.0.4\my.ini Service successfully installed. C:\mysql-8.0.4>net start wampmysqld64 The wampmysqld64 service is starting. The wampmysqld64 service was started successfully. C:\mysql-8.0.4>bin\mysql -uroot -p --port=4040 Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) C:\mysql-8.0.4>bin\mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.4-rc-log MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show variables like "port"; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.01 sec) mysql> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C:\>cd mysql-5.7.21 C:\mysql-5.7.21>bin\mysqld.exe --initialize-insecure C:\mysql-5.7.21>type my.ini [wampmysqld64] basedir=c:\mysql-5.7.21 datadir=c:\mysql-5.7.21\data port=4040 C:\mysql-5.7.21>bin\mysqld --install-manual wampmysqld64 --defaults-file=c:\mysql-5.7.21\my.ini Service successfully installed. C:\mysql-5.7.21>net start wampmysqld64 The wampmysqld64 service is starting. The wampmysqld64 service was started successfully. C:\mysql-5.7.21>bin\mysql -uroot -p --port=4040 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.21 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show variables like "port"; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 4040 | +---------------+-------+ 1 row in set (0.00 sec)
[12 Apr 2018 12:01]
MySQL Verification Team
Please see https://bugs.mysql.com/bug.php?id=78959 regarding path \bin issue.
[19 Apr 2018 14:28]
Dominique Ottello
Bug still present in version 8.0.11 just officially released. MySQL 8.0.11, under Windows, launched by a service, does not take into account the mysql options of the service name section, just like for this bug in version 8.0.4.
[19 Apr 2018 16:16]
MySQL Verification Team
https://bugs.mysql.com/bug.php?id=90512 marked as duplicate of this one.
[28 Jul 2018 10:38]
Dominique Ottello
Bug still present in version 8.0.12 just officially released. MySQL 8.0.12, under Windows, launched as a service, does not take into account the mysql options of the service name section, just like for this bug in version 8.0.4 and 8.0.11 MySQL 8.0.x is unusable under Windows as a service. I hope that this bug that dates back three versions will finally be fixed in the next version of MySQL. I will no longer offer MySQL 8 with Wampserver that I replace with MariaDB.
[21 Oct 2018 11:03]
Dominique Ottello
Hi, Is this bug that is not possible to use MySQL as a service under Windows is fixed with version 8.0.13 that will be released soon?
[23 Oct 2018 11:45]
Dominique Ottello
In MySQL 8 documentation https://dev.mysql.com/doc/refman/8.0/en/windows-start-service.html it is specified : For a MySQL server that is installed as a Windows service, the following rules determine the service name and option files that the server uses: [...] - If the service-installation command specifies a service name other than MySQL following the --install option, the server uses that service name. It reads options from the [mysqld] group and the group that has the same name as the service in the standard option files. This enables you to use the [mysqld] group for options that should be used by all MySQL services, and an option group with the service name for use by the server installed with that service name. With MySQL 8.0.13, this bug has been fixed and the directives of the group[wampmysqld64] (From the name of the service that starts MySQL 8.0.13) are well taken into account in the my.ini file. Nevertheless, the changelog for MySQL 8.0.13: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13.html in the Bugs Fixed section, does not mention the correction of bug #90383 (Right here) and the question arises whether it is an intentional correction of this bug or a simple side effect of a correction of something else. A clarification on this subject would be appreciated.
[26 Oct 2018 15:05]
Christine Cole
Posted by developer: Fixed in 8.0.13 and the following entry was added to the MySQL 8.0.13 changelog: Microsoft Windows: Starting MySQL as a Windows service with the service-installation command that specified a service name other than MySQL following the --install option ignored the directives in the named service group of the my.ini or my.cnf options files and used default options instead. Only the default service names (mysqld, mysql_cluster, server, mysqld-8.0) could load different parameters from an options file. Thank you for the report!