So erstellen Sie eine Verbindung zu einem MySQL-DB-System
Ö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> --private-endpoint-id <private_endpoint_ocid> --display-name <connection_name>
Hinweis
In diesem Beispiel wird davon ausgegangen, dass ein privater Endpunkt und das erforderliche Secret in einem Vault bereits vorhanden sind.
In diesem Beispiel wird davon ausgegangen, dass ein privater Endpunkt und das erforderliche Secret in einem Vault bereits vorhanden sind.
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://10.0.0.42:3306/exampledatabase" --private-endpoint-id cid1.databasetoolsprivateendpoint.oc1.phx.exampleendpoint25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabcdefg --display-name example-connection