Bug #36280 Cannot Install MySQL as Windows Service with SSL enabled
Submitted: 23 Apr 2008 9:39 Modified: 17 Sep 2008 15:27
Reporter: Asuka Kenji Siu Ching Pong (Basic Quality Contributor) (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.50sp1a-enterprise-gpl-nt,5.0.56sp1-enterprise-gpl-nt OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: NT Service, SSL, windows

[23 Apr 2008 9:39] Asuka Kenji Siu Ching Pong
Description:
The MySQL Service cannot install as a Windows Service with the --ssl option.

How to repeat:
Run the following commands (change the path accordingly)

-- CUT START HERE --
net stop MySQL
mysqld-nt.exe --remove MySQL
mysqld-nt.exe --defaults-file=C:\mysql-5.0.50sp1a\my.ini --install MySQL
mysqld-nt.exe --install MySQL --defaults-file=C:\mysql-5.0.50sp1a\my.ini
net start MySQL
mysql.exe -uroot -e "SHOW VARIABLES LIKE 'have_ssl';"

net stop MySQL
mysqld-nt.exe --remove MySQL
mysqld-nt.exe --install MySQL --defaults-file=C:\mysql-5.0.50sp1a\my.ini --ssl
mysqld-nt.exe --install MySQL --ssl --defaults-file=C:\mysql-5.0.50sp1a\my.ini
mysqld-nt.exe --ssl --install MySQL --defaults-file=C:\mysql-5.0.50sp1a\my.ini
mysqld-nt.exe --ssl --defaults-file=C:\mysql-5.0.50sp1a\my.ini --install MySQL
mysqld-nt.exe --defaults-file=C:\mysql-5.0.50sp1a\my.ini --install MySQL --ssl
mysqld-nt.exe --defaults-file=C:\mysql-5.0.50sp1a\my.ini --ssl --install MySQL
-- CUT STOP HERE --

The first set of commands removes the MySQL Windows Service (note that the first trial to start the server does not succeed, and is described in another bug), install it again, start it, and the client is run to confirm that SSL is disabled.

The second set of commands removes the MySQL Windows Service, and tries to start it (but all fail). They all return with "unknown option '--install'". The following command succeeds:

mysqld-nt.exe --defaults-file=C:\mysql-5.0.50sp1a\my.ini --ssl

but it is not installed as a Windows Service.
[23 Apr 2008 9:41] Asuka Kenji Siu Ching Pong
This bug may be related to bug #24063.
(http://bugs.mysql.com/bug.php?id=24063)
[29 Apr 2008 14:54] MySQL Verification Team
Thank you for the bug report. Could you please provide your my.ini file.
Thanks in advance.
[29 May 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[3 Jun 2008 3:27] Asuka Kenji Siu Ching Pong
my.ini

Attachment: my.ini (application/octet-stream, text), 9.00 KiB.

[3 Jun 2008 3:28] Asuka Kenji Siu Ching Pong
I have uploaded the my.ini file. HOwever, I don't think it is related to the configuration file. Please look at the examples I mentioned carefully. The problem is definitely related to the command-line parser.
[3 Jun 2008 3:42] Asuka Kenji Siu Ching Pong
The main problem is that, while this:

mysqld-nt.exe --install MySQL --defaults-file=C:\mysql-5.0.50sp1a\my.ini --ssl

fails, this:

mysqld-nt.exe --defaults-file=C:\mysql-5.0.50sp1a\my.ini --ssl

could be run successfully. When I used a client to connect to it, it showed that it has SSL enabled.

(The my.ini file I uploaded is from an installation of 5.0.56sp1. All configurations are the same except the paths. Furthermore, I have tested the above test cases against 5.0.56sp1-enterprise-gpl-nt, the problem is still not fixed.)
[17 Sep 2008 15:27] MySQL Verification Team
I couldn't repeat the behavior reported.

C:\mysql-5.0.67\bin>mysqld-nt.exe --install-manual MySQLTest --defaults-file=C:\mysql-5.0.67\my.ini
Service successfully installed.

C:\mysql-5.0.67\bin>net start MySQLTest
O serviço de MySQLTest está sendo iniciado.
O serviço de MySQLTest foi iniciado com êxito.

C:\mysql-5.0.67\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like "%ssl%";
+---------------+----------------------------+
| Variable_name | Value                      |
+---------------+----------------------------+
| have_openssl  | YES                        |
| have_ssl      | YES                        |
| ssl_ca        | C:/dbs/5.0/cacert.pem      |
| ssl_capath    |                            |
| ssl_cert      | C:/dbs/5.0/server-cert.pem |
| ssl_cipher    |                            |
| ssl_key       | C:/dbs/5.0/server-key.pem  |
+---------------+----------------------------+
7 rows in set (0.05 sec)

mysql>