MySQL DBシステムへの接続を作成するには

コマンド・プロンプトを開き、oci dbtools connection create-mysql-databaseを実行して、指定したコンパートメント内に新しいデータベース・ツール接続を作成します:

oci dbtools connection create-mysql-database -c <target_compartment_ocid> --user-name <database_user> --user-password-secret-id <vault_secret_ocid> --connection-string <connection_string> --private-endpoint-id <private_endpoint_ocid> --display-name <connection_name>
ノート

この例では、プライベート・エンドポイントおよびボールトの必要なシークレットがすでに存在することを前提としています。

次に例を示します。

oci dbtools connection create-mysql-database -c ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz --user-name "example-user" --user-password-secret-id ocid1.vaultsecret.oc1.phx.example1secrettxiu7mwuabcdefxl67fj5niy4akfzsabcdefzf3423ya --connection-string "mysql://10.0.0.42:3306/exampledatabase" --private-endpoint-id cid1.databasetoolsprivateendpoint.oc1.phx.exampleendpoint25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabcdefg --display-name example-connection