Bug #113764 mysqlinstallerconsole no offline silent mode
Submitted: 25 Jan 2024 19:08 Modified: 13 Feb 2024 22:10
Reporter: not happy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S3 (Non-critical)
Version:5.7.43, 5.7.44, 8.3.0 OS:Windows (Server 2019)
Assigned to: CPU Architecture:x86 (x64)
Tags: Automation, offline, silent

[25 Jan 2024 19:08] not happy
Description:
Installing the MySQL server in an offline automation environment requires that the installers support both the offline mode and the silent mode. THe msi installer does support silently installing the installers the media required for installs. However, using the mysqlinstallerconsole.exe does not respect either the --silent nor the --offline-mode=true set statement when attempting to install the server. Each time the program will attempt to check the Internet and then prompt whether the user wishes to use the offline mode, regardless of the command line arguments. If the user responds y to offline mode, then offline mode is set and can be undone by using the set --offline-mode=false argument.

How to repeat:
download the windows-installer-community-5.7.43.0.msi
transfer file to offline Windows Server 2019 machine
use powershell to run:
windows-installer-community-5.7.43.0.msi /qb
the result expected and received:
c:\Program Files (x86)\MySQL\MySQL Installer for Windows folder is created with the installer applications and,
c:\Program Data\MySQL\MySQL Installer for Windows folder is created with all of the packages to be installed

open a powershell console in:
c:\Program Files (x86)\MySQL\MySQL Installer for Windows\
run:
.\mysqlinstallerconsole.exe community --set --offline-mode=true --silent --install server:5.7.43.0
result:
Validating Internet Connection...
There seems to be no Internet connection, do you want to continue in offline mode...
[y],[n]

Suggested fix:
The product should allow the arguments supported to perform the required operations which is to install the MySQL community server v 5.7.43.0 without any prompts.
[30 Jan 2024 7:02] Jose Ramirez Ruiz
Hello,
I've confirmed there is a bug that prevents setting the offline mode without getting prompted for input. This report will be used to fix that behavior. It is possible to workaround this issue by adding an "<OfflineMode>true</OfflineMode>" entry to the "settings-community.xml" file usually located at "C:\ProgramData\MySQL\MySQL Installer for Windows".

Having said that, note that MySQL Installer console does not allow to execute multiple "actions" in a single command. You would first need to run the "--set ..." command and then execute the "--install" command. Additionally, you wrote the install command with an incorrect format, to achieve the installation you would need to execute it with the following format: "mysqlinstallerconsole.exe community --install server;5.7.43;x64 --silent".

Regards.

Jose Ramirez
MySQL Windows experience
[12 Feb 2024 16:09] Jose Ramirez Ruiz
Posted by developer:
 
The --silent option can now be used for all CLI actions.
CLI has been updated to not prompt the user if there is no internet connection and the --silent option was provided. If there is no internet connection and the --silent options has not been provided, the user will still be prompted to enable offline mode (if it is not yet enabled).
[13 Feb 2024 22:10] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Installer 1.6.10 release, and here's the proposed changelog entry from the documentation team:

The MySQL Console now supports the --silent option for all CLI
operations.

Thank you for the bug report.