Creating a Custom Configuration

Create a custom configuration for the DB system.

Note

The custom configurations created with these steps only support standalone DB systems. If you want to create a custom configuration that supports high availability DB systems, you have to perform the steps in Copying a Configuration.

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. On the Configurations list page, select Create Configuration. If you need help finding the list page, see Listing Configurations - Using the Console.
  2. In the Provide basic information for the configuration section, enter the following information:
    • Name: Specify a user-friendly display name for the configuration. The name does not need to be unique. A unique Oracle Cloud Identifier (OCID) is generated to identify the configuration.
    • Description: (Optional) Specify a description for the configuration.
  3. In the Configure placement and hardware section, enter the following information:
    • Select a compartment: If you want to create the configuration in a different compartment, select the required compartment.
    • Select a shape: Specify the shape associated with the configuration. Select Select shape to open the Browse all shapes dialog box. Select the required shape. Then, select Select a shape. See Supported Shapes.
  4. In the Initialization variables section, you can select Ignore case in table and schema names to disable table and schema names case sensitivity. See Initialization Variables.
  5. In the User variables (read/write) section, select the variable you want to add in Variable name drop down list, and enter or select the Variable value. To add another variable to your configuration, select Add variable.
    Note

    Variables containing a set of flags such as optimizer_switch are configured in the User flag set variables (read/write) section.
    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. The User flag set variables (read/write) section is used to configure variables containing a set of flags. Expand the variable that you want to configure and perform one or more of the following to configure the flags of the variable:
    • Select Default value to populate the list of flags with the default value. Then, you can change the flag values as required.
    • Select Add flag to add a new row of flag name and value. Select a flag name and select the flag value. Repeat for every new flag that you want to add to the variable.
    • Select X at the end of a row to remove a flag from the variable.
  7. (Optional) Select Show advanced options to expand the Tags section. You can add a tag by selecting a Tag namespace and enter a Tag key and its Tag value. If you want to add another tag, select Add tag to create another row.
  8. (Optional) To save the resource definition as a Terraform configuration, select Save as stack. See Creating a Stack from a Resource Creation Page.
  9. To create the configuration, select 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.

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 Identifier (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:
  1. 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 <JSONObject>
    • 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, MySQL.4.
    • variables: (Optional) Specify the variables and their corresponding values as key value pairs in a JSON object, for example:
      { "autocommit": true, "connectTimeout": 20 } 
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": "2024-07-18T01:12:58.850Z"
      }
    },
    "description": "This is a user defined descrption",
    "display-name": "ConfigName",
    "freeform-tags": {},
    "id": "ocid1.mysqlconfiguration.oc1.longAlphanumericString",
    "init-variables": {
      "lower-case-table-names": "CASE_SENSITIVE"
    },
    "lifecycle-state": "ACTIVE",
    "parent-configuration-id": "ocid1.mysqlconfiguration.oc1..longAlphanumericString",
    "shape-name": "MySQL.4",
    "time-created": "2024-07-18T01:12:58.894000+00:00",
    "time-updated": "2024-07-18T01:12:58.894000+00:00",
    "type": "CUSTOM",
    "variables": {
      "autocommit": true,
      "big-tables": null,
      "binlog-expire-logs-seconds": 3600,
      "binlog-row-metadata": null,
      "binlog-row-value-options": "PARTIAL_JSON",
      "binlog-transaction-compression": null,
      "completion-type": null,
      "connect-timeout": 20,
      "connection-memory-chunk-size": null,
      "connection-memory-limit": null,
      "cte-max-recursion-depth": null,
      "default-authentication-plugin": null,
      "foreign-key-checks": null,
      "generated-random-password-length": null,
      "global-connection-memory-limit": null,
      "global-connection-memory-tracking": null,
      "group-replication-consistency": "BEFORE_ON_PRIMARY_FAILOVER",
      "information-schema-stats-expiry": null,
      "innodb-buffer-pool-dump-pct": null,
      "innodb-buffer-pool-instances": 4,
      "innodb-buffer-pool-size": 21474836480,
      "innodb-ddl-buffer-size": null,
      "innodb-ddl-threads": null,
      "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-log-writer-threads": null,
      "innodb-max-purge-lag": null,
      "innodb-max-purge-lag-delay": 300000,
      "innodb-stats-persistent-sample-pages": null,
      "innodb-stats-transient-sample-pages": null,
      "interactive-timeout": null,
      "local-infile": true,
      "mandatory-roles": "public",
      "max-allowed-packet": null,
      "max-binlog-cache-size": 4294967296,
      "max-connect-errors": null,
      "max-connections": 2000,
      "max-execution-time": null,
      "max-heap-table-size": 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-default-compression-level": null,
      "mysqlx-zstd-max-client-compression-level": null,
      "net-read-timeout": null,
      "net-write-timeout": null,
      "parser-max-mem-size": null,
      "query-alloc-block-size": null,
      "query-prealloc-size": null,
      "regexp-time-limit": null,
      "sort-buffer-size": null,
      "sql-mode": null,
      "sql-require-primary-key": null,
      "sql-warnings": null,
      "thread-pool-dedicated-listeners": null,
      "thread-pool-max-transactions-limit": null,
      "time-zone": "UTC",
      "tmp-table-size": null,
      "transaction-isolation": null,
      "wait-timeout": null
    }
  },
  "etag": "longAlphanumericString"
}