Creating a Custom Configuration

Create a custom configuration for the DB system.

Using the Console

Use the Console to create a custom configuration for the DB system.

This task requires the following:
  • A policy that permits you to create configurations in the compartment or tenancy.
Do the following to create a custom configuration using the console:
  1. Open the navigation menu and select Databases. Under MySQL HeatWave, click Configurations.
  2. Click Create Configuration.
  3. In the Create Configuration panel, on the Configuration Information section, provide the following details:
    • Name: Specify a user-friendly display name for the configuration. The name does not need to be unique. An Oracle Cloud Identifier (OCID) uniquely identifies the configuration.
    • Description: (Optional) Specify a description of the configuration.
    • Configure placement and hardware:
      • Select a Compartment: (Optional) If you want to create the configuration in a different compartment, select the required compartment.
      • Select a Shape: (Optional) Specify the shape associated with the configuration. Click Change Shape to open the Browse All Shapes dialog box. Select the required shape and click Select a Shape. See Supported Shapes.
    • Show Advanced Options:
      • Tags: (Optional) Specify a Tag Namespace, Tag Key, and Tag Value.
  4. Click Next.
  5. In the Variables Information section, provide the following details:
    • Initialization Variables: (Optional) Enable Ignore case in table and schema names to disable case sensitivity. See Initialization Variables.
    • User Variables: (Optional) Select the variable you want to add in Variable Names drop down list, and specify the Variable Value. To add another variable to your configuration, click +Another Variable .

      Every configuration has a set of default system and user variables. If you do not select any variable, Oracle adds these default variables to the Configuration. See System Variables and User Variables.

  6. To create the configuration, click Create.
    Note

    Once you create the configuration, you cannot edit the variables defined on the configuration. To edit variables, create a new configuration with the desired variables, or copy an existing configuration, edit the variables, and edit the DB system to use the new configuration. See Updating the Configuration of a DB System.
  7. (Optional) To save the resource configuration as a stack, click Save as stack. You can later use the stack to install, configure, and manage the resources through the Resource Manager service. See Managing Stacks.

Using the CLI

Use the command-line interface to create a custom configuration for the DB system.

This task requires the following:
  • A compartment Oracle Cloud Indetifier (OCID).
  • A policy that permits you to create configurations in the compartment or tenancy.
  • A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.
Create a custom configuration using the CLI either using a JSON payload or from a single command without using a JSON payload:
  1. Using a JSON payload: Open a command prompt and run the following command:
    oci  mysql configuration create 
         -compartment-id <CompartmentOCID>
         --description "<UserDescription>"
         --display-name <UserDisplayName> 
         --shape-name <ShapeName> 
         --variables <JSONPayload>
    • compartment-id: Specify the OCID of the compartment in you create your configuration..
    • description: (Optional) Specify a brief description of the configuration.
    • display-name: (Optional) Specify the display name of the configuration. If you do not define a display name, Oracle generates one for you in the mysqlconfigurationYYYYMMDDHHMMSS format.
    • shape-name: Specify the name of the shape. For example, VM.Standard.E2.1.
    • variables: (Optional) Specify the JSON payload. For example, file://config.json. In the JSON payload, specify the variables in the "name":value format:
      {
          "autocommit": true,
          "connectTimeout": 20,
          "sql-require-primary-key": true
      } 
  2. (Optional) Without using a JSON payload: You can run the command from a single command line rather than using a JSON payload.
    oci mysql configuration create -c <CompartmentOCID>
         --description "<UserDescription>"
         --display-name <UserDisplayName>  
         --shape-name <ShapeName> 
         --variables '{ "autocommit": true, "connectTimeout": 20, "sql-require-primary-key": true }'       
If the command validates and runs successfully, you get a response similar to the following, which summarizes the request and creates the configuration:
{
  "data": {
    "compartment-id": "ocid1.compartment.oc1..longAlphanumericString",
    "defined-tags": {
      "Oracle-Tags": {
        "CreatedBy": "userName",
        "CreatedOn": "2020-07-07T11:01:19.623Z"
      }
    },
    "description": this is a user-defined configuration,
    "display-name": "UserConfig001",
    "freeform-tags": {},
    "id": "ocid1.mysqlconfiguration.oc1.iad.longAlphanumericString",
    "lifecycle-state": "ACTIVE",
    "parent-configuration-id": null,
    "shape-name": "VM.Standard.E2.1",
    "time-created": "2020-07-07T11:01:19.635000+00:00",
    "time-updated": "2020-07-07T11:01:19.635000+00:00",
    "type": "CUSTOM",
    "variables": {
      "autocommit": true,
      "binlog-expire-logs-seconds": 3600,
      "completion-type": null,
      "connect-timeout": 20,
      "cte-max-recursion-depth": null,
      "default-authentication-plugin": null,
      "foreign-key-checks": null,
      "generated-random-password-length": null,
      "information-schema-stats-expiry": null,
      "innodb-buffer-pool-instances": 4,
      "innodb-buffer-pool-size": 3758096384,
      "innodb-ft-enable-stopword": null,
      "innodb-ft-max-token-size": null,
      "innodb-ft-min-token-size": null,
      "innodb-ft-num-word-optimize": null,
      "innodb-ft-result-cache-limit": 33554432,
      "innodb-ft-server-stopword-table": null,
      "innodb-lock-wait-timeout": null,
      "innodb-max-purge-lag": null,
      "innodb-max-purge-lag-delay": 300000,
      "local-infile": true,
      "mandatory-roles": "public",
      "max-connections": 1000,
      "max-execution-time": null,
      "max-prepared-stmt-count": null,
      "mysql-firewall-mode": null,
      "mysql-zstd-default-compression-level": null,
      "mysqlx-connect-timeout": null,
      "mysqlx-deflate-default-compression-level": null,
      "mysqlx-deflate-max-client-compression-level": null,
      "mysqlx-document-id-unique-prefix": null,
      "mysqlx-enable-hello-notice": null,
      "mysqlx-idle-worker-thread-timeout": null,
      "mysqlx-interactive-timeout": null,
      "mysqlx-lz4-default-compression-level": null,
      "mysqlx-lz4-max-client-compression-level": null,
      "mysqlx-max-allowed-packet": null,
      "mysqlx-min-worker-threads": null,
      "mysqlx-read-timeout": null,
      "mysqlx-wait-timeout": null,
      "mysqlx-write-timeout": null,
      "mysqlx-zstd-max-client-compression-level": null,
      "parser-max-mem-size": null,
      "query-alloc-block-size": null,
      "query-prealloc-size": null,
      "sql-mode": null,
      "sql-require-primary-key": true,
      "sql-warnings": null,
      "transaction-isolation": null
    }
  }
}