So erstellen Sie eine Verbindung zu einer MySQL Database

Öffnen Sie eine Eingabeaufforderung, und führen Sie oci dbtools connection create-mysql-database aus, um eine neue Verbindung zu Datenbanktools im angegebenen Compartment zu erstellen:

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> --display-name <connection_name>
Hinweis

In diesem Beispiel wird davon ausgegangen, dass das erforderliche Secret in einem Vault bereits vorhanden ist.

Beispiel:

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://public-ip-or-fqdn:3306/exampledatabase" --display-name example-connection