Bug #116012 MySQL8 - mysqld_'--no-monitor' option not working
Submitted: 5 Sep 2024 14:08 Modified: 6 Sep 2024 11:59
Reporter: KERN Dév Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:8.0.33 OS:Windows
Assigned to: CPU Architecture:x86
Tags: MySQL 8

[5 Sep 2024 14:08] KERN Dév
Description:
After installing and benchmarking MySQL8 version (8.0.33-commercial) on a windows server, I've tried to disable second process mysqld (automatically launched as monitoring process).

So installing an instance mysql8 as daemon without two processes is not possible ?

Please I need help ..

I've tried disabling it with --no-monitor in my command : mysqld.exe -install MySQL8_3316 --defaults-file="[MYSQL_SERVER8_PATH]\DATAS\my.ini" --no-monitor=ON
(Source https://dev.mysql.com/doc/refman/8.4/en/server-options.html#option_mysqld_no-monitor)

2 problems :
- an error appeared with :
Failed to set datadir to [MYSQL_SERVER8_PATH]\data and **Can't create test file [MYSQL_SERVER8_PATH]\data\mysqld_tmp_file_case_insensitive_test.lower-test and **

- since data was created manually to bypass 1st issue, with defaut mysql db/tables : 2024-09-05T12:50:53.576226Z 0 [ERROR] [MY-000069] [Server] [MYSQL_SERVER8_PATH]\bin\mysqld.exe: unknown option '-i'.

How to repeat:
So I try to install the server as a service using this command following the installation guide 
(https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/windows-start-service.html)

mysqld.exe -install MySQL8_Server --defaults-file="[MYSQL_SERVER8_PATH]\DATAS\my.ini" --no-monitor=ON

'Service successfully installed.' doesn't appears and when you check the log you've got

---------------------------------------------------------------------
2024-09-05T12:26:59.884195Z 0 [Warning] [MY-010080] [Server] The use of InnoDB is mandatory since MySQL 5.7. The former options like '--innodb=0/1/OFF/ON' or '--skip-innodb' are ignored.
2024-09-05T12:26:59.884533Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2024-09-05T12:26:59.885486Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2024-09-05T12:26:59.885880Z 0 [System] [MY-010116] [Server] C:\KPS\KpsFactory\MySQL\MySQL8_NO_MONITOR\bin\mysqld.exe (mysqld 8.0.33-commercial) starting as process 6560
2024-09-05T12:27:00.024034Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-09-05T12:27:04.606374Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-09-05T12:27:06.219641Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-09-05T12:27:06.221269Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-09-05T12:27:06.249194Z 0 [ERROR] [MY-000069] [Server] C:\KPS\KpsFactory\MySQL\MySQL8_NO_MONITOR\bin\mysqld.exe: unknown option '-i'.
2024-09-05T12:27:06.252039Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-09-05T12:27:07.733991Z 0 [System] [MY-010910] [Server] C:\KPS\KpsFactory\MySQL\MySQL8_NO_MONITOR\bin\mysqld.exe: Shutdown complete (mysqld 8.0.33-commercial)  MySQL Enterprise Server - Commercial.
---------------------------------------------------------------------
[5 Sep 2024 17:55] MySQL Verification Team
A typo,  you've said "-install" instead of "--install" on the command line.
[6 Sep 2024 8:19] KERN Dév
Is there any differences between them ? 
I try these command and it works both.

When I put '--install' for my test, the only difference I see is
2024-09-05T12:24:26.413974Z 0 [ERROR] [MY-000068] [Server] unknown option '--install'.

instead of
2024-09-05T12:27:06.249194Z 0 [ERROR] [MY-000069] [Server] [PATH_SERVER_MYSQL8]\bin\mysqld.exe: unknown option '-i'.

It seems that mysqld does not take the ‘--default-file’ option... and I've moved all my folders 'MySQL' into a single folder to make sure I don't miss any information.

Any suggestions ?
[6 Sep 2024 11:59] MySQL Verification Team
Here how to do it,  put that option in my.ini

C:\my\mysql-commercial-8.0.39-winx64>bin\mysqld.exe --install MySQL8_Server --defaults-file=c:/my/my.ini --local-service
Service successfully installed.

C:\my\mysql-commercial-8.0.39-winx64>type c:\my\my.ini
[mysqld]
skip-log-bin
basedir=C:/my/mysql-commercial-8.0.39-winx64
datadir=C:/my/mysql-commercial-8.0.39-winx64/data
no-monitor=ON

The docs state:
https://dev.mysql.com/doc/refman/8.0/en/windows-start-service.html

"If a service name is given, it can be followed by a single option. By convention, this should be --defaults-file=file_name to specify the name of an option file from which the server should read options when it starts. "