MySQLInstallerConsole.exe provides command-line functionality that is similar to MySQL Installer. This reference includes:
The console is installed when MySQL Installer is initially executed and then available within theMySQL Installer for Windows directory. By default, the directory location isC:\Program Files (x86)\MySQL\MySQL Installer for Windows. You must run the console as administrator.
To use the console:
Open a command prompt with administrative privileges by selectingWindows System fromStart, then right-clickCommand Prompt, selectMore, and selectRun as administrator.
From the command line, optionally change the directory to where theMySQLInstallerConsole.exe command is located. For example, to use the default installation location:
cd Program Files (x86)\MySQL\MySQL Installer for WindowsType
MySQLInstallerConsole.exe(ormysqlinstallerconsole) followed by a command action to perform a task. For example, to show the console's help:MySQLInstallerConsole.exe --help=================== Start Initialization ===================MySQL Installer is running in Community modeAttempting to update manifest.Initializing product requirements.Loading product catalog.Checking for product packages in the bundle.Categorizing product catalog.Finding all installed packages.Your product catalog was last updated at 23/08/2022 12:41:05 p. m.Your product catalog has version number 671.=================== End Initialization ===================The following actions are available:Configure - Configures one or more of your installed programs.Help - Provides list of available command actions.Install - Installs and configures one or more available MySQL programs.List - Lists all available MySQL products.Modify - Modifies the features of installed products.Remove - Removes one or more products from your system.Set - Configures the general options of MySQL Installer.Status - Shows the status of all installed products.Update - Updates the current product catalog.Upgrade - Upgrades one or more of your installed programs.The basic syntax for using MySQL Installer command actions. Brackets denote optional entities. Curly braces denote a list of possible entities....
Many of theMySQLInstallerConsole command actions accept one or more abbreviated phrases that can match a MySQL product (or products) in the catalog. The current set of valid short phrases for use with commands is shown in the following table.
Starting with MySQL Installer 1.6.7 (8.0.34), theinstall,list, andupgrade command options no longer apply to MySQL for Visual Studio (now EOL), MySQL Connector/NET, MySQL Connector/ODBC, MySQL Connector/C++, MySQL Connector/Python, and MySQL Connector/J. To install newer MySQL connectors, visit https://dev.mysql.com/downloads/.
Table 5.3 MySQL Product Phrases for use with the MySQLInstallerConsole.exe command
| Phrase | MySQL Product |
|---|---|
server | MySQL Server |
workbench | MySQL Workbench |
shell | MySQL Shell |
visual | MySQL for Visual Studio |
router | MySQL Router |
backup | MySQL Enterprise Backup (requires the commercial release) |
net | MySQL Connector/NET |
odbc | MySQL Connector/ODBC |
c++ | MySQL Connector/C++ |
python | MySQL Connector/Python |
j | MySQL Connector/J |
documentation | MySQL Server Documentation |
samples | MySQL Samples (sakila and world databases) |
TheMySQLInstallerConsole.exe command can be issued with or without the file extension (.exe) and the command is not case-sensitive.
mysqlinstallerconsole[.exe] [[[--]action] [action_blocks_list] [options_list]]
Description:
actionOne of the permitted operational actions. If omitted, the default action is equivalent to the
--statusaction. Using the--prefix is optional for all actions.Possible actions are: [--]
configure, [--]help, [--]install, [--]list, [--]modify, [--]remove, [--]set, [--]status, [--]update, and [--]upgrade.action_blocks_listA list of blocks in which each represents a different item depending on the selected action. Blocks are separated by commas.
The
--removeand--upgradeactions permit specifying an asterisk character (*) to indicate all products. If the*character is detected at the start of this block, it is assumed all products are to be processed and the remainder of the block is ignored.Syntax:
*|action_block[,action_block][,action_block]...action_block: Contains a product selector followed by an indefinite number of argument blocks that behave differently depending on the selected action (seeCommand Actions).options_listZero or more options with possible values separated by spaces. SeeCommand Actions to identify the options permitted for the corresponding action.
Syntax:
option_value_pair[option_value_pair][option_value_pair]...option_value_pair: A single option (for example,--silent) or a tuple of a key and a corresponding value with an options prefix. The key-value pair is in the form of--.key[=value]
MySQLInstallerConsole.exe supports the following command actions:
Configuration block (orarguments_block) values that contain a colon character (:) must be wrapped in quotation marks. For example,install_dir="C:\MySQL\MySQL Server 8.0".
[--]configure [product1]:[configuration_argument]=[value], [product2]:[configuration_argument]=[value], [...]Configures one or more MySQL products on your system. Multiple
configuration_argument=valuepairs can be configured for each product.Options:
--continueContinues processing the next product when an error is caught while processing the action blocks containing arguments for each product. If not specified the whole operation is aborted in case of an error.
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--show-settingsDisplays the available options for the selected product by passing in the product name after
--show-settings.
--silentDisables confirmation prompts.
Examples:
MySQLInstallerConsole --configure --show-settings servermysqlinstallerconsole.exe --configure server:port=3307Displays a help message with usage examples and then exits. Pass in an additional command action to receive help specific to that action.
Options:
--action=[action]Shows the help for a specific action. Same as using the
--helpoption with an action.Permitted values are:
all,configure,help(default),install,list,modify,remove,status,update,upgrade, andset.--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
Examples:
MySQLInstallerConsole helpMySQLInstallerConsole help --action=install[--]install [product1]:[features]:[config block]:[config block], [product2]:[config block], [...]Installs one or more MySQL products on your system. If pre-release products are available, both GA and pre-release products are installed when the value of the
--typeoption value isClientorFull. Use the--only_ga_productsoption to restrict the product set to GA products only when using these setup types.Description:
[product]Each product can be specified by aproduct phrase with or without a semicolon-separated version qualifier. Passing in a product keyword alone selects the latest version of the product. If multiple architectures are available for that version of the product, the command returns the first one in the manifest list for interactive confirmation. Alternatively, you can pass in the exact version and architecture
(x86orx64) after the product keyword using the--silentoption.
[features]All features associated with a MySQL product are installed by default. The feature block is a semicolon-separated list of features or an asterisk character (
*) that selects all features. To remove a feature, use themodifycommand.
[config block]One or more configuration blocks can be specified. Each configuration block is a semicolon-separated list of key-value pairs. A block can include either a
configorusertype key;configis the default type if one is not defined.Configuration block values that contain a colon character (
:) must be wrapped in quotation marks. For example,installdir="C:\MySQL\MySQL Server 8.0". Only one configuration type block can be defined for each product. A user block should be defined for each user to be created during the product installation.NoteThe
usertype key is not supported when a product is being reconfigured.
Options:
--auto-handle-prereqsIf present, MySQL Installer attempts to download and install some software prerequisites, not currently present. that can be resolved with minimal intervention. If the
--silentoption is not present, you are presented with installation pages for each prerequisite. If the--auto-handle-prereqsoptions is omitted, packages with missing prerequisites are not installed.--continueContinues processing the next product when an error is caught while processing the action blocks containing arguments for each product. If not specified the whole operation is aborted in case of an error.
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--mos-password=passwordSets the My Oracle Support (MOS) user's password for commercial versions of the MySQL Installer.
--mos-user=user_nameSpecifies the My Oracle Support (MOS) user name for access to the commercial version of MySQL Installer. If not present, only the products in the bundle, if any, are available to be installed.
--only-ga-productsRestricts the product set to include GA products only.
--setup-type=setup_typeInstalls a predefined set of software. The setup type can be one of the following:
Server: Installs a single MySQL serverClient: Installs client programs and libraries (excludes MySQL connectors)Full: Installs everything (excludes MySQL connectors)Custom: Installs user-selected products. This is the default option.
NoteNon-custom setup types are valid only when no other MySQL products are installed.
--show-settingsDisplays the available options for the selected product, by passing in the product name after
-showsettings.
--silentDisable confirmation prompts.
Examples:
mysqlinstallerconsole.exe --install j;8.0.29, net;8.0.28 --silentMySQLInstallerConsole install server;8.0.30:*:port=3307;server_id=2:type=user;user=fooAn example that passes in additional configuration blocks, separated by
^to fit:MySQLInstallerConsole --install server;8.0.30;x64:*:type=config;open_win_firewall=true; ^ general_log=true;bin_log=true;server_id=3306;tcp_ip=true;port=3306;root_passwd=pass; ^ install_dir="C:\MySQL\MySQL Server 8.0":type=user;user_name=foo;password=bar;role=DBManagerWhen this action is used without options, it activates an interactive list from which all of the available MySQL products can be searched. Enter
MySQLInstallerConsole --listand specify a substring to search.Options:
--allLists all available products. If this option is used, all other options are ignored.
--arch=architectureLists that contain the specified architecture. Permitted values are:
x86,x64, andany(default). This option can be combined with the--nameand--versionoptions.--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--name=package_nameLists products that contain the specified name (seeproduct phrase), This option can be combined with the
--versionand--archoptions.--version=versionLists products that contain the specified version, such as 8.0 or 5.7. This option can be combined with the
--nameand--archoptions.
Examples:
MySQLInstallerConsole --list --name=net --version=8.0[--]modify [product1:-removelist|+addlist], [product2:-removelist|+addlist] [...]Modifies or displays features of a previously installed MySQL product. To display the features of a product, append the product keyword to the command, for example:
MySQLInstallerConsole --modify serverOptions:
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--silentDisable confirmation prompts.
Examples:
MySQLInstallerConsole --modify server:+documentationMySQLInstallerConsole modify server:-debug[--]remove [product1], [product2] [...]Removes one ore more products from your system. An asterisk character (
*) can be passed in to remove all MySQL products with one command.Options:
--continueContinue the operation even if an error occurs.
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--keep-datadirSkips the removal of the data directory when removing MySQL Server products.
--silentDisable confirmation prompts.
Examples:
mysqlinstallerconsole.exe remove *MySQLInstallerConsole --remove server --continueSets one or more configurable options that affect how the MySQL Installer program connects to the internet and whether the automatic products-catalog updates feature is activated.
Options:
--catalog-update=bool_valueEnables (
true, default) or disables (false) the automatic products catalog update. This option requires an active connection to the internet.--catalog-update-days=int_valueAccepts an integer between 1 (default) and 365 to indicate the number of days between checks for a new catalog update when MySQL Installer is started. If
--catalog-updateisfalse, this option is ignored.--connection-validation=validation_typeSets how MySQL Installer performs the check for an internet connection. Permitted values are
automatic(default) andmanual.--connection-validation-urls=url_listA double-quote enclosed and comma-separated string that defines the list of URLs to use for checking the internet connection when
--connection-validationis set tomanual. Checks are made in the same order provided. If the first URL fails, the next URL in the list is used and so on.--offline-mode=bool_valueEnables MySQL Installer to run with or without internet capabilities. Valid modes are:
Trueto enable offline mode (run without an internet connection).False(default) to disable offline mode (run with an internet connection). Set this mode before downloading the product catalog or any products to install.
--proxy-modeSpecifies the proxy mode. Valid modes are:
Automaticto automatically identify the proxy based on the system settings.Noneto ensure that no proxy is configured.Manualto set the proxy details manually (--proxy-server,--proxy-port,--proxy-username,--proxy-password).
--proxy-passwordThe password used to authenticate to the proxy server.
--proxy-portThe port used for the proxy server.
--proxy-serverThe URL that point to the proxy server.
--proxy-usernameThe user name used to authenticate to the proxy server.
--reset-defaultsResets the MySQL Installer options associated with the
--setaction to the default values.
Examples:
MySQLIntallerConsole.exe set --reset-defaultsmysqlintallerconsole.exe --set --catalog-update=falseMySQLIntallerConsole --set --catalog-update-days=3mysqlintallerconsole --set --connection-validation=manual --connection-validation-urls="https://www.bing.com,http://www.google.com"Provides a quick overview of the MySQL products that are installed on the system. Information includes product name and version, architecture, date installed, and install location.
Options:
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
Examples:
MySQLInstallerConsole statusDownloads the latest MySQL product catalog to your system. On success, the catalog is applied the next time either
MySQLInstallerorMySQLInstallerConsole.exe is executed.MySQL Installer automatically checks for product catalog updates when it is started if
ndays have passed since the last check. Starting with MySQL Installer 1.6.4, the default value is 1 day. Previously, the default value was 7 days.Options:
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
Examples:
MySQLInstallerConsole update[--]upgrade [product1:version], [product2:version] [...]Upgrades one or more products on your system. The following characters are permitted for this action:
*Pass in
*to upgrade all products to the latest version, or pass in specific products.!Pass in
!as a version number to upgrade the MySQL product to its latest version.
Options:
--continueContinue the operation even if an error occurs.
--helpShows the options and available arguments for the corresponding action. If present the action is not executed, only the help is shown, so other action-related options are ignored as well.
--mos-password=passwordSets the My Oracle Support (MOS) user's password for commercial versions of the MySQL Installer.
--mos-user=user_nameSpecifies the My Oracle Support (MOS) user name for access to the commercial version of MySQL Installer. If not present, only the products in the bundle, if any, are available to be installed.
--silentDisable confirmation prompts.
Examples:
MySQLInstallerConsole upgrade *MySQLInstallerConsole upgrade workbench:8.0.31MySQLInstallerConsole upgrade workbench:!MySQLInstallerConsole --upgrade server;8.0.30:!, j;8.0.29:!