MySQLInstallerConsole は、GUI バージョンの MySQL Installer と同様の機能を提供しますが、コマンド行から実行します。これは、MySQL Installer をはじめて実行した際にインストールされ、MySQL Installer
ディレクトリ内で利用可能になります。通常これは C:\Program Files (x86)\MySQL\MySQL Installer\
で、Console は管理者権限で実行しなければなりません。
使用するには、「管理者として実行」
を選択して、管理者権限でコマンドプロンプトを起動します。そして、オプションでコマンド行からディレクトリを MySQLInstallerConsole のある場所に変更します。
C:\> cd "C:\Program Files (x86)\MySQL\MySQL Installer"
C:\> MySQLInstallerConsole.exe help
C:\Program Files (x86)\MySQL\MySQL Installer for Windows>MySQLInstallerConsole.exe help
The following commands are available:
Configure - Configures one or more of your installed programs.
Help - Provides list of available commands.
Install - Install and configure one or more available MySQL programs.
List - Provides an interactive way to list all products available.
Modify - Modifies the features of installed products.
Remove - Removes one or more products from your system.
Status - Shows the status of all installed products.
Update - Update the current product catalog.
Upgrade - Upgrades one or more of your installed programs.
MySQLInstallerConsole は次のオプションをサポートします。これらはコマンド行で指定します。
-
configure
[product1]:[setting]=[value]; [product2]:[setting]=[value]; [...]システム上の 1 つまたは複数の MySQL 製品を構成します。
次のようなスイッチがあります。
-showsettings
: 製品名を-showsettings
の後ろに渡すことによって、選択された製品の使用可能なオプションを表示します。-silent
: 確認プロンプトを無効にします。
C:\> MySQLInstallerConsole configure -showsettings server C:\> MySQLInstallerConsole configure server:port=3307
-
ヘルプメッセージを使用例とともに表示して終了します。コマンドに固有のヘルプを受信するには、そのコマンドを渡します。
C:\> MySQLInstallerConsole help C:\> MySQLInstallerConsole help install
-
install
[product]:[features]:[config block]:[config block]:[config block]; [...]システムに 1 つまたは複数の MySQL 製品をインストールします。
次のようなスイッチと構文オプションがあります。
-
-type=[SetupType]
: 事前定義されたソフトウェアのセットをインストールします。「SetupType」は次のいずれかです。注記Custom 以外のセットアップタイプは、ほかに MySQL 製品がインストールされていない場合のみ選択できます。
Developer: 完全な開発環境をインストールします。
Server: 単一の MySQL Server をインストールします。
Client: クライアントプログラムとライブラリをインストールします。
Full: すべてをインストールします。
Custom: ユーザーが選択した製品をインストールします。これはデフォルトのオプションです。
-showsettings
: 製品名を-showsettings
の後ろに渡すことによって、選択された製品の使用可能なオプションを表示します。-silent
: 確認プロンプトを無効にします。-
[config block]
: 1 つまたは複数の構成ブロックを指定できます。各構成ブロックは、セミコロンで区切られたキーと値のペアのリストです。ブロックには、「config」または「user」タイプのいずれかのキーを含むことができ、指定されない場合は「config」がデフォルトタイプです。「config」タイプのブロックは製品あたり 1 つのみ定義できます。「user」ブロックは、製品のインストール中に作成された各ユーザーに対して定義してください。
注記製品の再構成中のユーザーの追加はサポートされていません。
[feature]
: 機能ブロックは、セミコロンで区切られた機能のリストまたは「*」 (全機能を選択) です。
C:\> MySQLInstallerConsole install server;5.6.22:*:port=3307;serverid=2:type=user;username=foo;password=bar;role=DBManager C:\> MySQLInstallerConsole install server;5.6.22;x64 -silent
-
-
利用可能なすべての MySQL 製品を検索できるインタラクティブなコンソールをリストします。
MySQLInstallerConsole list
を実行してコンソールを起動し、検索する部分文字列を入力します。C:\> MySQLInstallerConsole list
-
modify
[product1:-removelist|+addlist] [product2:-removelist|+addlist] [...]
以前にインストールされた MySQL 製品の機能を変更または表示します。
-silent
: 確認プロンプトを無効にします。
C:\> MySQLInstallerConsole modify server C:\> MySQLInstallerConsole modify server:+documentation C:\> MySQLInstallerConsole modify server:-debug
-
remove
[product1] [product2] [...]
システム上から 1 つまたは複数の製品を削除します。
*
: すべての MySQL 製品を削除するには*
を渡します。-continue
: エラーが発生しても操作を継続します。-silent
: 確認プロンプトを無効にします。
C:\> MySQLInstallerConsole remove * C:\> MySQLInstallerConsole remove server
-
システムにインストールされている MySQL 製品の簡単な概要を提供します。情報には、製品名とバージョン、アーキテクチャー、インストール日、およびインストールの場所が含まれます。
C:\> MySQLInstallerConsole status
-
upgrade [product1:version] [product2:version], [...]
システム上の 1 つまたは複数の製品をアップグレードします。次のような構文オプションがあります。
*
: すべての製品を最新のバージョンにアップグレードするには*
を渡します。あるいは具体的な製品を渡します。!
: MySQL 製品を最新バージョンにアップグレードするには、バージョン番号として!
を渡します。-silent
: 確認プロンプトを無効にします。
C:\> MySQLInstallerConsole upgrade * C:\> MySQLInstallerConsole upgrade workbench:6.2.2 C:\> MySQLInstallerConsole upgrade workbench:! C:\> MySQLInstallerConsole upgrade workbench:6.2.2 excel:1.3.2
-
最新の MySQL 製品カタログをシステムにダウンロードします。成功すると、次に MySQLInstaller または MySQLInstallerConsole が実行されたときに、ダウンロードカタログが適用されます。
C:\> MySQLInstallerConsole update
注記「Automatic Catalog Update」 GUI オプションはこのコマンドを Windows のタスクスケジューラから実行します。