To create a connection to a MySQL DB system via JSON

Open a command prompt and run oci dbtools connection create-mysql-database to create a new Database Tools connection as specified in the JSON file:

oci dbtools connection create-mysql-database --from-json "file://<path-to-json>"
Note

This example assumes a private endpoint and the required secret in a vault already exist.

For example, specifying all required details in a JSON file:

{  
    "compartmentId": "ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz",  
    "userName": "example-user",  
    "userPasswordSecretId": "ocid1.vaultsecret.oc1.phx.example1secrettxiu7mwuabcdefxl67fj5niy4akfzsababcdefzf3423ya",  
    "connectionString": "mysql://10.0.0.42:3306/exampledatabase",  
    "privateEndpointId": "cid1.databasetoolsprivateendpoint.oc1.phx.exampleendpoint25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabcdefg",  
    "displayName": "example-connection-from-json"
}
Note

In this example, there is a JSON file in the current working directory called example.json as shown above.
oci dbtools connection create-mysql-database --from-json "file://example.json"