Managing a DB System

Checking the status of a DB System

To check the status of a MySQL DB System:
  1. Open the navigation menu and select Databases. Under MySQL, click DB Systems.
  2. Choose your Compartment.
    A list of DB Systems is displayed.
  3. In the list of DB Systems, find yours and check the icon in the State column. The color of the icon, and the associated text, indicate the status of the DB System.
    • CREATING: Yellow icon. Resources are being reserved for the DB system, the system is booting, and the initial database is being created. Provisioning can take several minutes. The system is not ready to use yet.

    • ACTIVE: Green icon. The DB system was successfully created.

    • UPDATING: Yellow icon. The DB system is in the process of starting, stopping, or restarting. This status is also used if a replication channel associated with the DB System is updating.

    • INACTIVE: Grey icon. The DB system is powered off by the stop or reboot action in the Console or API.

    • DELETING: Yellow icon. The DB system is being deleted by the terminate action in the Console or API.

    • DELETED: Red icon. The DB system has been deleted and is no longer available.

    • FAILED: Red icon. An error condition prevented the creation or continued operation of the DB system.

Starting, stopping, or rebooting a DB System

  1. Open the navigation menu and select Databases. Under MySQL, click DB Systems.
  2. Choose your Compartment.
    A list of DB Systems is displayed.
  3. In the list of DB Systems, find the DB System you want to stop or start. To stop, start, or restart the DB System, do one of the following:
    • Select the DB System and choose the required action from the Actions menu at the top of the page, or the Actions icon (three dots) on the same line as your DB System.
    • Click the name of the DB System to open the DB System details page. On this page you can stop, start, or restart the DB System, and view details of the DB System.
  4. Select one of the following actions:
    • Start: Starts a stopped DB System. After the DB System is started, the Stop action is enabled and the Start option is disabled.
    • Stop: Stops a running DB System. After the DB System is powered off, the Start action is enabled.
      Note

      The automatic backup schedule continues to backup your DB System when it is in an inactive state. It is also possible to create a manual backup of an inactive DB System.
    • Restart: Shuts down a DB System, and restarts it.
    Stopping a DB System stops billing for all OCPUs associated with it. Billing continues for storage. Billing for OCPUs resumes if you restart the DB System.
    If you selected Stop or Restart, the Stop/Restart MySQL DB System dialog is displayed.
  5. Select a shutdown type:
    • Fast: Flushes dirty pages before shutting down the DB System. Some flush operations must be performed during next startup, potentially increasing the duration of the startup process.
    • Slow: Flushes dirty pages and purges undo log pages for older transactions. The shutdown itself can take longer, but the subsequent startup is faster.
    • Immediate: Does not flush dirty pages and does not purge any undo log pages. Stops MySQL immediately. Page flushes and log purging will take place during the next startup, increasing the duration of the startup process.
  6. Select the required shutdown type and click the Stop or Restart button, depending on the action chosen.
Note

Start, stop, or restart actions on the DB System also affect any associated HeatWave cluster. If a DB System with an associated HeatWave cluster is restarted, you must reload your HeatWave data.

Editing a DB System

To edit a DB System, do the following:
  1. Open the navigation menu and select Databases. Under MySQL, click DB Systems.
  2. Choose your Compartment.
    A list of DB Systems is displayed.
  3. In the list of DB Systems, find the DB System you want to update and do one of the following:
    • Choose Edit from the Actions icon (three dots) on the same line as your DB System.
    • Click the name of the DB System to open the DB System details page. Click Edit.
    The Edit MySQL DB System is displayed.
  4. You can edit the following:
    • Name: A user-friendly display name for the DB system. The name does not need to be unique. An Oracle Cloud Identifier (OCID) uniquely identifies the DB system.
    • Description: A user-friendly description of the DB System and its purpose.
    • Select Advanced Options to update the DB System's configuration, maintenance window, and tagging:
      • Configuration tab: under Select a Configuration, select Change Configuration to open the Browse Configurations for Selected Shape Name dialog. Select the required configuration and click Select a configuration.
      • Management tab: in Maintenance Window Start Time (Optional) specify a convenient time for required maintenance. If you do not specify a day and time, one is chosen for you.
      • Tags: edit the DB System's tags as required.
  5. Enable Navigate to the MySQL DB System details page after closing the dialog to open the DB System's details page after closing the edit dialog. Disable to return to the list view. This option is available only if the edit dialog was opened from the list view.
  6. Click Save Changes to save the changes.
    If you selected a new configuration, the DB System is restarted. Restart is not required for edits to the Name or Description.

Deleting a DB System

Deleting a DB System permanently deletes it. Any manual backups associated with the deleted DB System are retained for their retention periods. Automatic backups are deleted with the DB System.

  1. Open the navigation menu and select Databases. Under MySQL, click DB Systems.
  2. Choose your Compartment.
    A list of DB Systems is displayed.
  3. In the list of DB Systems, find the DB System you want to delete. You can do one of the following:
    • Select the DB System and choose the required action from the Actions menu at the top of the page, or the Actions icon (three dots) on the same line as your DB System.
    • Click the name of the DB System to open the DB System details page. On this page you can delete the DB System, and view details of the DB System.
  4. Delete the DB System.
    A prompt is displayed asking you to confirm the deletion.
  5. Enter the name of the DB System and click Delete.

Managing Tags

Managing tags on DB Systems and resources.

To manage tags:
  1. Open the navigation menu and select Databases. Under MySQL, select the resource you want to manage.
  2. Choose your Compartment
  3. Find the resource you are interested in and click the name.
  4. Click the Tags tab to view or edit the existing tags. Or click Apply Tag(s) to add new tags.

MySQL DB System Details

MySQL DB System Details page displays DB System details and is divided into the following sections:

Table 7-1 Elements of the MySQL DB System Details page

Name Description
MySQL DB System Information Basic information on the DB System and its configuration. For more information, see MySQL DB System Information.
Resources Contains the following sections:

MySQL DB System Information

This section describes the MySQL DB System Information section of the MySQL DB System Details page.

Table 7-2 MySQL DB System Information

Field Description
General Information
  • OCID: the unique identifier of the DB System.
  • Description: user-defined description of the DB System.
  • Compartment: the name of the compartment the DB System was created in. To see the compartment's OCID, click the name.
  • Created: date and time the DB System was created.
DB System Configuration
  • Shape: the resource template applied to the DB System.
  • OCPU Count: the number of OCPUs allocated to the DB System. For Highly Available systems, this also provides a breakdown of OCPUs used per instance.
  • Memory: amount of RAM allocated to the DB System. For Highly Available systems, this also provides a breakdown of RAM allocated per instance.
  • Storage Size: the amount of storage available to the DB System. For Highly Available systems, this also provides a breakdown of storage allocated per instance.
  • MySQL Version: the version of MySQL contained by the DB System
  • Configuration: the name of the MySQL configuration used in the DB System and a link to that configuration's details page.
Backup
  • Automatic Backups: displays automatic backup status. Enabled or Disabled
  • Retention Days: number of days the automatic backups are retained.
  • Backup Window: the time at which the automatic backup window starts.
Maintenance
  • Maintenance Window Start: the time at which the maintenance window starts. Required maintenance of the DB System, such as Operating System or MySQL Server patching or maintenance, is performed during a window which starts at this time.
HeatWave
  • HeatWave Cluster: displays HeatWave cluster status for this DB System. Enabled or Disabled. If the DB System is using the correct shape, an active link to Enable HeatWave Cluster is also displayed. This opens the Add HeatWave Cluster dialog. See Adding a HeatWave Cluster to a DB System.
  • HeatWave State: displays the current state of the HeatWave Cluster; Active or Inactive.
  • HeatWave Nodes: displayed only if HeatWave is enabled. Displays the number of HeatWave nodes in the cluster.
  • HeatWave Capacity: displayed only if HeatWave is enabled. Displays the amount of storage available to the HeatWave cluster.
High Availability
  • High Availability: displays the High Availability status for this DB System. Enabled or Disabled.
  • High Availability Type: one of the following:
    • Multi-AD: the MySQL instances are placed in different availability domains.
    • Multi-FD: the MySQL instances are placed in different fault domains in a single availability domain.
Networking
  • Virtual Cloud Network: the network on which the DB System was created.
  • Subnet: the subnet to which the DB System is attached.
  • Subnet Type: the type of subnet. Regional or AD-specific.
Endpoint
  • Private IP Address: the IP address of the DB System. This address is not accessible from the internet.
  • Internal FQDN: the Fully Qualified Domain Name of your DB System. This value is populated only if you defined a hostname.
  • Availability Domain: the availability domain the DB System is in. For more information, see Regions and Availability Domains.
  • Fault Domain: the fault domain within the Availability Domain. For more information, see Fault Domains
  • Preferred Availability Domain: (High Availability only) the selected location of the primary instance. If a failover has occurred, a message is displayed here, stating that the current primary is not in the preferred location.
  • Preferred Fault Domain: (High Availability only) the selected location of the primary instance.
  • MySQL Port: the port on which the server listens.
  • MySQL X Protocol Port: the port on which the server listens for clients using the MySQL X Protocol, such as MySQL Shell.
Inbound Replication Channel Displayed only if a channel is associated with the DB System.
  • Replication Channel: whether the channel is enabled or disabled.
  • Channel State: the lifecycle state of the channel.

MySQL DB System Metrics

The Metrics resource of the MySQL DB System Details page.

Table 7-3 MySQL DB System Metrics

Field Description
Start/End Time Specify a time range for the metric display.
Quick Selects Select a predefined range.
Metric graphs For more information on the DB System metrics, see Overview of MySQL Database Service Metrics.
Filters: Metrics Data Displayed only for DB Systems with HeatWave clusters attached. Filters the metric data. The following selections are possible:
  • All: display DB System and HeatWave cluster metrics data.
  • DB System: display DB System metric data, only.
  • HeatWave: display HeatWave metric data, only.
Aggregated HeatWave Metrics Data Displays the aggregated metric data for the HeatWave cluster attached to the DB System.
  • Disabled: the data is displayed for each of the cluster's nodes. The relevant metric graphs display a line for each node.
  • Enabled: the node data is aggregated and displayed as a single line.

Endpoints

This section describes the Endpoints section of the MySQL DB System Details page.

Table 7-4 Endpoints Overview

Field Description
Hostname The hostname name of the endpoint. This is the hostname you defined when specifying the network information in the Create MySQL DB System page. If you did not define a hostname, this field is left blank.
Status Current state:
  • CREATING: Resources are being reserved for the DB system, the system is booting, and the initial database is being created. Creating can take several minutes. The system is not ready to use yet.
  • ACTIVE: The DB system was successfully created.
  • UPDATING: The DB system is in the process of starting, stopping, or restarting.
  • INACTIVE: The DB system is powered off.
  • DELETING: The DB system is being deleted.
  • DELETED: The DB system has been deleted and is no longer available.
  • FAILED: An error condition prevented the creation or continued operation of the DB system.
Address The IP address of the endpoint.
MySQL Port The MySQL port of the endpoint. Default is 3306.
MySQL X Protocol Port The MySQL X Protocol port of the endpoint.
Modes One of the following values:
  • READ,WRITE
  • READ_ONLY

Backups

The Backups resource of the MySQL DB System Details page.

Table 7-5 Backups Overview

Field Description
Create Manual Backup Opens the Create Manual Backup dialog.
Name Name of the backup
State State of the backup
Retention Days Retention period of the backup.
Size The size of the backup.
Created The date the backup was created.
Actions (three dot) menu
The actions (three dot) menu contains the following:
  • View Backup Details: opens the Backup Details page. For more information, see Backup Details
  • Restore to New DB System: opens the Restore to a new DB System page. For more information, see Creating a New DB System from a Backup.
  • Edit: opens the Edit Backup dialog. You can edit the Display Name and Description of the backup.
  • Copy OCID: copies the backup OCID to the clipboard.
  • Add Tags: opens the Add One or more Tags to this Resource dialog. Enabling you to add tags to the backup.
  • View Tags: displays the tags applied to the backup.
  • Delete: opens the Delete Backup dialog. Follow the prompts to delete the backup.

Menu containing backup-specific actions such as , View Backup Details, and so on

Channels

This topic describes the Channels section of the MySQL DB System Details page.

Table 7-6 Channels Overview

Field Description
Name The display name of the channel.
Source The IP address or hostname of the MySQL Source.
Target The name of the target DB System.
State Current state:
  • CREATING: Yellow icon. The Channel is being created. Provisioning can take several minutes. The channel is not yet replicating data from the source to the target.

  • ACTIVE: Green icon. The Channel was successfully enabled.

  • UPDATING: Yellow icon. A Channel operation is ongoing.

  • NEEDS_ATTENTION: Yellow icon. This status is displayed for the following reasons:
    • The Channel is not replicating due to an error. The Details column on the Channels page lists why the channel needs attention.
    • The target DB System is INACTIVE. This can also occur if the channel was created or updated while the DB System was in INACTIVE state. Pending actions are applied if the DB System is started.
  • INACTIVE: Yellow icon. The Channel is not replicating because the user disabled it.

  • DELETING: Yellow icon. The Channel is being deleted.

  • DELETED: Grey icon. The Channel has been deleted and is no longer available.

Details Information or errors relating to the current state of the channel.
Enabled Whether the channel is enabled.
Created Date and time the channel was created.
Actions menu The actions (three dot) menu contains the following:
  • View Channel Details: opens the Channel Details page. For more information, see Channel Details.
  • Disable/Enable: click Disableto disable the replication channel. Click Enable to enable the replication channel. For more information, see Enabling or Disabling a Channel.
  • Reset: resets the channel, removing all channel metadata. For more information, see Resetting a Channel.
  • Resume: resumes the channel in the event of an error. For more information, see Resuming a Channel.
  • Copy OCID: copies the OCID of the Channel to the clipboard.
  • View Tags: opens the View Tags dialog, displaying all tags defined on this channel.
  • Add Tags: opens the Add One or More Tag to this Resource dialog, enabling you to define tags for the channel.
  • Delete: opens the Delete Channel dialog. Follow the prompts to delete the channel.

HeatWave Cluster Information

This section describes the HeatWave Cluster Information and HeatWave Node sections of the MySQL DB System Details page, where you can view, manage, and edit your HeatWave cluster .

Table 7-7 HeatWave Cluster Information

Field Description
Actions The following actions are possible:
Cluster Size The number of nodes in the cluster.
Shape The shape used for HeatWave cluster nodes.
State The state of the HeatWave cluster:
  • CREATING: Yellow icon. Resources are being reserved for the HeatWave cluster, and the cluster is being created. Provisioning can take several minutes. The cluster is not ready to use yet.

  • ACTIVE: Green icon. The HeatWave cluster was successfully created.

  • UPDATING: Yellow icon. The HeatWave cluster is in the process of starting, stopping, restarting, or updating after an edit.

  • INACTIVE: Grey icon. The HeatWave cluster is powered off by the stop action in the console or API.

  • DELETING: Orange icon. The HeatWave cluster is being deleted by the terminate action in the console or API.

  • DELETED: Grey icon. The HeatWave cluster has been deleted and is no longer available.

  • FAILED: Red icon. An error condition prevented the creation or continued operation of the HeatWave cluster.

Created The date and time the HeatWave cluster was created.
Last Updated The date and time the HeatWave cluster was last updated.

Table 7-8 HeatWave Nodes

Column Description
Node Id The name of the HeatWave node.
State Current state of the HeatWave node:
  • CREATING: Yellow icon. Resources are being reserved for the HeatWave node, and the node is being created. Provisioning can take several minutes. The node is not ready to use yet.

  • ACTIVE: Green icon. The HeatWave node was successfully created.

  • UPDATING: Yellow icon. The HeatWave node is in the process of starting, stopping, restarting, or updating.

  • INACTIVE: Grey icon. The HeatWave node is powered off by the stop or restart action in the Console or API.

  • DELETING: Orange icon. The HeatWave node is being deleted by the terminate action in the Console or API.

  • DELETED: Grey icon. The HeatWave node has been deleted and is no longer available.

  • FAILED: Red icon. An error condition prevented the creation or continued operation of the HeatWave node.

Created The date and time the HeatWave node was created.

Work Requests

This topic describes the Work Requests section of the MySQL DB System Details page.

Table 7-9 Work Requests

Field Description
Operation One of the following operation names:
  • CREATE_DBSYSTEM
  • UPDATE_DBSYSTEM
  • DELETE_DBSYSTEM
  • START_DBSYSTEM
  • STOP_DBSYSTEM
  • RESTART_DBSYSTEM
  • ADD_ANALYTICS_CLUSTER
  • UPDATE_ANALYTICS_CLUSTER
  • DELETE_ANALYTICS_CLUSTER
  • START_ANALYTICS_CLUSTER
  • STOP_ANALYTICS_CLUSTER
  • RESTART_ANALYTICS_CLUSTER
  • GENERATE_ANALYTICS_CLUSTER_MEMORY_ESTIMATE

For more information on Work Requests, see Work Request Overview.

State Current state:
  • ACCEPTED: The request is in the work request queue to be processed.

  • IN_PROGRESS: A work request record exists for the specified request, but there is no associated WORK_COMPLETED record.

  • SUCCEEDED: A work request record exists for this request and an associated WORK_COMPLETED record has the state SUCCEEDED.

  • FAILED: A work request record exists for this request and an associated WORK_COMPLETED record has the state FAILED.
  • CANCELING: The work request is in the process of canceling.

  • CANCELED: The work request has been canceled.

Progress A progress bar for the work request.
% Complete The percentage completion.
Accepted Date and time the operation was accepted.
Started Date and time the operation started.
Finished Date and time the operation finished.
Action menu (3 dots) Opens the action menu. The following actions are possible:
  • View Work Request: opens the Work Request Details page.

Retrieving DB System details using the CLI

This task describes how to retrieve DB System details using the CLI oci mysql db-system get command.

To perform this task, you must have the following:
  • DB System OCID
  • Properly configured CLI installation and the requisite SSH keys. For more information, see Command Line Interface
  1. Open a command prompt and run the following to create a DB System. For example:.
    oci mysql db-system get --db-system-id ocid1.mysqldbsystem.oc1.iad.longAlphaNumericString

    where:

    • db-system-id: (mandatory) the OCID of the DB System.

    If the command validates and is processed correctly, a response similar to the following is displayed, summarizing the request made:
    {
      "data": {
        "availability-domain": "fblN:US-ASHBURN-AD-2",
        "backup-policy": {
          "defined-tags": null,
          "freeform-tags": null,
          "is-enabled": true,
          "retention-in-days": 7,
          "window-start-time": "00:00"
        },
        "compartment-id": "ocid1.compartment.oc1..longAlphaNumericString",
        "configuration-id": "ocid1.mysqlconfiguration.oc1..longAlphaNumericString",
        "data-storage-size-in-gbs": 50,
        "defined-tags": {
          "Oracle-Tags": {
            "CreatedBy": "userName",
            "CreatedOn": "2020-06-24T16:20:02.957Z"
          }
        },
        "description": "This is my DBSystem",
        "display-name": "MyDBSystem",
        "endpoints": [
          {
            "hostname": null,
            "ip-address": "10.0.1.15",
            "modes": [
              "READ",
              "WRITE"
            ],
            "port": 3306,
            "port-x": 33060,
            "status": "ACTIVE",
            "status-details": null
          }
        ],
        "fault-domain": "FAULT-DOMAIN-1",
        "freeform-tags": {
          "prod": "doc"
        },
        "hostname-label": null,
        "id": "ocid1.mysqldbsystem.oc1.iad.longAlphaNumericString",
        "ip-address": "10.0.1.28",
        "lifecycle-details": null,
        "lifecycle-state": "ACTIVE",
        "maintenance": {
          "window-start-time": "SUNDAY 13:40"
        },
        "mysql-version": "8.0.21",
        "port": 3306,
        "port-x": 33060,
        "shape-name": "VM.Standard.E2.1",
        "source": null,
        "subnet-id": "ocid1.subnet.oc1.iad.longAlphaNumericString",
        "time-created": "2020-06-24T16:20:04.683000+00:00",
        "time-updated": "2020-07-05T13:56:15.851000+00:00"
      }
    }
    

MySQL Database Service Events

MySQL Database Service integrates with the Events Service.

For information on how to use events, see Getting Started with Events.

For information on matching events with filters, see Matching Events with Filters.

MySQL Database Service resources that emit events:

MySQL Database: Backup Event Types

These are the event types emitted by MySQL Database backups.

Table 7-10 MySQL Database: Backup Event Types

Friendly Name Event Type
MySQL - Create Backup Begin com.oraclecloud.mysqlaas.createbackup.begin
MySQL - Create Backup End com.oraclecloud.mysqlaas.createbackup.end
MySQL - Delete Backup Begin com.oraclecloud.mysqlaas.deletebackup.begin
MySQL - Delete Backup End com.oraclecloud.mysqlaas.deletebackup.end
MySQL - Update Backup com.oraclecloud.mysqlaas.updatebackup
Backup Event Example

This is a reference event for backups.

{
  "id": "ocid1.eventschema.oc1.phx.abyhqljrbev33v3gwkdhs5amcfrmps36useiwlgm64qz4kz3wuvudocd3iyq",
  "exampleEvent": {
    "cloudEventsVersion": "0.1",
    "eventID": "3e74a48c-be5c-4002-8b3e-2196fa215528",
    "eventType": "com.oraclecloud.mysqlaas.createbackup.begin",
    "source": "Mysqlaas",
    "eventTypeVersion": "2.0",
    "eventTime": "2020-12-11T19:03:00.009Z",
    "contentType": "application/json",
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID"
    },
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "my_compartment_name",
      "resourceName": "my_backup",
      "resourceId": "ocid1.mysqlbackup.oc1.iad..unique_ID",
      "availabilityDomain": "AD2",
      "freeFormTags": {},
      "definedTags": {},
      "additionalDetails": {
        "timeCreated": "2021-01-03T22:45:15.986Z",
        "timeUpdated": "2021-01-03T22:45:15.986Z",
        "lifecycleState": "CREATING",
        "lifecycleDetails": "details message",
        "backupType": "FULL",
        "creationType": "MANUAL",
        "dbSystemId": "ocid1.mysqldbsystem.oc1.iad..unique_ID"
      }
    }
  }

MySQL Database: Channel Event Types

These are the event types emitted by MySQL Database channels.

Table 7-11 MySQL Database: Channel Event Types

Friendly Name Event Type
MySQL - Create Channel Begin com.oraclecloud.mysqlaas.createchannel.begin
MySQL - Create Channel End com.oraclecloud.mysqlaas.createchannel.end
MySQL - Delete Channel Begin com.oraclecloud.mysqlaas.deletechannel.begin
MySQL - Delete Channel End com.oraclecloud.mysqlaas.deletechannel.end
MySQL - Reset Channel Begin com.oraclecloud.mysqlaas.resetchannel.begin
MySQL - Reset Channel End com.oraclecloud.mysqlaas.resetchannel.end
MySQL - Resume Channel Begin com.oraclecloud.mysqlaas.resumechannel.begin
MySQL - Resume Channel End com.oraclecloud.mysqlaas.resumechannel.end
MySQL - Update Channel Begin com.oraclecloud.mysqlaas.updatechannel.begin
MySQL - Update Channel End com.oraclecloud.mysqlaas.updatechannel.end
Channel Event Example

This is a reference event for channels.

{
  "id": "ocid1.eventschema.oc1.phx.abyhqljrt6kqt63chc77x4xqtpaaaub6il5w7mjnd5mybvnt5rfc54gtaeca",
  "exampleEvent": {
    "cloudEventsVersion": "0.1",
    "eventID": "68c6cef7-2f26-4e76-b7cb-ad4ba34f97dc",
    "eventType": "com.oraclecloud.mysqlaas.createchannel.begin",
    "source": "Mysqlaas",
    "eventTypeVersion": "2.0",
    "eventTime": "2021-01-06T19:12:00.009Z",
    "contentType": "application/json",
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID"
    },
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "my_compartment_name",
      "resourceName": "my_channel",
      "resourceId": "ocid1.mysqlchannel.oc1.iad..unique_ID",
      "availabilityDomain": "AD1",
      "freeFormTags": {},
      "definedTags": {},
      "additionalDetails": {
        "lifecycleState": "CREATING",
        "lifecycleDetails": "details message",
        "timeCreated": "2021-01-06T19:12:00.009Z",
        "timeUpdated": "2021-01-06T19:12:00.009Z",
        "isEnabled": false,
        "dbSystemId": "ocid1.mysqldbsystem.oc1.iad..unique_ID"
      }
    }
  }

MySQL Database: Configuration Event Types

These are the event types emitted by MySQL Database configurations.

Table 7-12 MySQL Database: Configuration Event Types

Friendly Name Event Type
MySQL - Create Configuration com.oraclecloud.mysqlaas.createconfiguration
MySQL - Delete Configuration com.oraclecloud.mysqlaas.deleteconfiguration
Configuration Event Example

This is a reference event for configuration.

{
  "id": "ocid1.eventschema.oc1.phx.abyhqljrhxtbyw736z5vyafba3sonhtd6jplirofn56eoikda6jpovgtd2oa",
  "exampleEvent": {
    "cloudEventsVersion": "0.1",
    "eventID": "3e74a48c-be5c-4002-8b3e-2196fa215528",
    "eventType": "com.oraclecloud.mysqlaas.createconfiguration",
    "source": "Mysqlaas",
    "eventTypeVersion": "2.0",
    "eventTime": "2020-12-11T19:03:00.009Z",
    "contentType": "application/json",
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID"
    },
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "my_compartment_name",
      "resourceName": "my_configuration",
      "resourceId": "ocid1.mysqlconfiguration.oc1.iad..unique_ID",
      "availabilityDomain": "AD2",
      "freeFormTags": {},
      "definedTags": {},
      "additionalDetails": {
        "shapeName": "MySQL.VM.Standard.E3.1.8GB",
        "timeCreated": "2021-01-03T22:45:15.986Z",
        "timeUpdated": "2021-01-03T22:45:15.986Z",
        "lifecycleState": "ACTIVE",
        "lifecycleDetails": "details message"
      }
    }
  }

MySQL Database: DB System Event Types

These are the event types emitted by MySQL Database DB Systems.

Table 7-13 MySQL Database: DB System Event Types

Friendly Name Event Type
MySQL - Create DB System Begin com.oraclecloud.mysqlaas.createdbsystem.begin
MySQL - Create DB System End com.oraclecloud.mysqlaas.createdbsystem.end
MySQL - Delete DB System Begin com.oraclecloud.mysqlaas.deletedbsystem.begin
MySQL - Delete DB System End com.oraclecloud.mysqlaas.deletedbsystem.end
MySQL - Restart DB System Begin com.oraclecloud.mysqlaas.restartdbsystem.begin
MySQL - Restart DB System End com.oraclecloud.mysqlaas.restartdbsystem.end
MySQL - Start DB System Begin com.oraclecloud.mysqlaas.startdbsystem.begin
MySQL - Start DB System End com.oraclecloud.mysqlaas.startdbsystem.end
MySQL - Stop DB System Begin com.oraclecloud.mysqlaas.stopdbsystem.begin
MySQL - Stop DB System End com.oraclecloud.mysqlaas.stopdbsystem.end
MySQL - Update DB System Begin com.oraclecloud.mysqlaas.updatedbsystem.begin
MySQL - Update DB System End com.oraclecloud.mysqlaas.updatedbsystem.end
DB System Event Example

This is a reference event for DB Systems.

{
  "id": "ocid1.eventschema.oc1.phx.abyhqljrxqkzl5e7oxhcpirxvtfkjczhgjxi7b7fb36r2clncm5nkrmhvcqq",
  "exampleEvent": {
    "cloudEventsVersion": "0.1",
    "eventID": "3e74a48c-be5c-4002-8b3e-2196fa215528",
    "eventType": "com.oraclecloud.mysqlaas.createdbsystem.begin",
    "source": "Mysqlaas",
    "eventTypeVersion": "2.0",
    "eventTime": "2020-12-11T19:03:00.009Z",
    "contentType": "application/json",
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID"
    },
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "my_compartment_name",
      "resourceName": "my_dbsystem",
      "resourceId": "ocid1.mysqldbsystem.oc1.iad..unique_ID",
      "availabilityDomain": "AD1",
      "freeFormTags": {},
      "definedTags": {},
      "additionalDetails": {
        "lifecycleState": "CREATING",
        "lifecycleDetails": "details message",
        "timeCreated": "2020-12-11T19:03:00.009Z",
        "timeUpdated": "2020-12-11T19:03:00.009Z",
        "configurationId": "ocid1.compartment.oc1..unique_ID",
        "shapeName": "VM.Standard.E2.1"
      }
    }
  }

MySQL Database: HeatWave Event Types

These are the event types emitted by MySQL Database HeatWave Clusters.

Table 7-14 MySQL Database: HeatWave Cluster Event Types

Friendly Name Event Type
MySQL - Add HeatWave Cluster Begin com.oraclecloud.mysqlaas.addheatwavecluster.begin
MySQL - Add HeatWave Cluster End com.oraclecloud.mysqlaas.addheatwavecluster.end
MySQL - Delete HeatWave Cluster Begin com.oraclecloud.mysqlaas.deleteheatwavecluster.begin
MySQL - Delete HeatWave Cluster End com.oraclecloud.mysqlaas.deleteheatwavecluster.end
MySQL - Restart HeatWave Cluster Begin com.oraclecloud.mysqlaas.restartheatwavecluster.begin
MySQL - Restart HeatWave Cluster End com.oraclecloud.mysqlaas.restartheatwavecluster.end
MySQL - Start HeatWave Cluster Begin com.oraclecloud.mysqlaas.startheatwavecluster.begin
MySQL - Start HeatWave Cluster End com.oraclecloud.mysqlaas.startheatwavecluster.end
MySQL - Stop HeatWave Cluster Begin com.oraclecloud.mysqlaas.stopheatwavecluster.begin
MySQL - Stop HeatWave Cluster End com.oraclecloud.mysqlaas.stopheatwavecluster.end
MySQL - Update HeatWave Cluster Begin com.oraclecloud.mysqlaas.updateheatwavecluster.begin
MySQL - Update HeatWave Cluster End com.oraclecloud.mysqlaas.updateheatwavecluster.end
HeatWave Event Example

This is a reference event for HeatWave.

{
  "id": "ocid1.eventschema.oc1.phx.abyhqljrn7utc6clova6m54dwncjv22ceii2qags7no72lxk3c4qw4yrhxsa",
  "exampleEvent": {
    "cloudEventsVersion": "0.1",
    "eventID": "18718a59-6b39-4066-97e9-bb98cd8df29a",
    "eventType": "com.oraclecloud.mysqlaas.addheatwavecluster.begin",
    "source": "Mysqlaas",
    "eventTypeVersion": "2.0",
    "eventTime": "2020-12-11T19:03:00.009Z",
    "contentType": "application/json",
    "extensions": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID"
    },
    "data": {
      "compartmentId": "ocid1.compartment.oc1..unique_ID",
      "compartmentName": "my_compartment_name",
      "resourceName": "my_dbsystem",
      "resourceId": "ocid1.mysqldbsystem.oc1.iad..unique_ID",
      "availabilityDomain": "AD1",
      "freeFormTags": {},
      "definedTags": {},
      "additionalDetails": {
        "lifecycleState": "CREATING",
        "lifecycleDetails": "details message",
        "timeCreated": "2021-01-06T22:40:00.009Z",
        "timeUpdated": "2020-12-11T19:03:00.009Z",
        "dbSystemId": "ocid1.mysqldbsystem.oc1.iad..dbsystem_unique_ID",
        "shapeName": "BM.Standard.E2.64",
        "clusterSize": 2
      }
    }
  },

Health Monitor

MySQL Health Monitor alerts on disk space.

MySQL Health Monitor is a MySQL Server component which monitors the amount of disk space available to you and raises alarms when preconfigured limits are breached. The variables and thresholds are not configurable.

Note

In the event your available disk space drops below a set amount for a specific duration, the MySQL server engages a fallback mode (SUPER_READ_ONLY) which rejects all new incoming SQL write statements (UPDATE, INSERT, DELETE, and DDL), regardless of users and privileges. Running transactions are allowed to complete.

To view the data stored by the Health Monitor, see Checking available disk space.

Warnings and errors are logged to the performance_schema.error_log table. See Diagnosing Errors for more information

Thresholds and Alerts

Pre-configured available storage thresholds and their alerts.

Health Monitor defines three storage thresholds, each configured to send a message to the performance_schema.error_log table if the available storage drops below their defined value (%).

The available storage is not the total storage. Available storage is the total amount of available storage minus the reserve storage defined by the Health Monitor. For more information on reserve storage, see SUPER_READ_ONLY Fallback Mode.

For example, if the amount of available disk space falls below 20% of available storage, the threshold disk_usage_warning_level_1 is triggered and the warning WARNING_DISK_USAGE_LEVEL_1 is sent to the error log.

For more information on the error log, see Diagnosing Errors.

SUPER_READ_ONLY Fallback Mode

Safety mode in the event of a critical disk space issue.

Health Monitor defines a certain amount of storage as the reserve storage and a smaller amount as critical storage. Reserve storage is defined by disk_low_space_level and disk_low_space_percent, whichever is the higher amount. Critical storage is defined by disk_low_space_critical_level.

See Health Monitor Configuration for more information.

If the available disk space falls below the value defined by disk_low_space_level or disk_low_space_percent, whichever value is lower, for a number of seconds defined by disk_low_space_duration, the server enables the following:
  • SUPER_READ_ONLY: rejects all new incoming write statements (UPDATE, INSERT, DELETE, and DDL), regardless of users and privileges. Running transactions are allowed to complete, but no new writes are permitted until the disk space availability issue is resolved. SUPER_READ_ONLY=ON also implicitly enables READ_ONLY.
  • OFFLINE_MODE: disconnects client users who do not have the CONNECTION_ADMIN privilege, terminates running statements and releases locks, and blocks new connections with an appropriate error.

If the available disk space falls below the value defined for disk_low_space_critical_level for any length of time, the server enables SUPER_READ_ONLY immediately.

If SUPER_READ_ONLY is enabled, error messages similar to the following are displayed for any client which attempts to connect to the server:
'MySQL Error 1290 (HY000): The MySQL server is running with the --super-read-only 
option so it cannot execute this statement @ file bytes range [1400005472, 1500005697)'.

For more information on Health Monitor messaging, see Health Monitor Message Reference.

To reset the server, you must correct the storage issue and restart your DB System.

If you cannot correct the storage issue, you must create a new DB System using a manual backup of the original, and define a larger amount of storage before proceeding with your transactions. See Backing Up a DB System and Creating a New DB System from a Backup for more information.

Health Monitor Configuration

Health Monitor configuration values. All Health Monitor configuration variables are prefixed with health_monitor.. This prefix is omitted in this section. The variable values cannot be altered.

Table 7-15 Health Monitor Configuration Variables

Configuration Variable Default Value Description
disk_fallback_enable ON Indicates whether the fallback is enabled.
disk_low_space_critical_level 2000 Defines the critical low disk space in MiB. If the available disk space fall below this value for any duration, the server is put into read only mode.
disk_low_space_duration 300 Defines the duration in seconds the available disk space can remain below either disk_low_space_level or disk_low_space_percent, depending on which is the lower value, before the server is put into read only mode.
disk_low_space_level 5000 Defines the total mount of disk space designated as reserve storage in MiB. If the available disk space drops below this level for longer than the value of disk_low_space_duration, the server is put into read only mode.
disk_low_space_percent 4 Defines the low space level in percent. If the available disk space drops below this percentage of total available storage for longer than the value of disk_low_space_duration, the server is put into read only mode.
disk_monitored /db Mount point for disk statistics.
disk_retention 86400 The number of data samples retained.
disk_running ON Indicates the active state of the Health Monitor.
disk_sample_rate 60 Defines the rate of data collection, in seconds.
disk_usage_warning_level_1 20 Defines a percentage of available disk space, above the defined disk_low_space_level. If the available disk space falls below this level, the warning WARNING_DISK_USAGE_LEVEL_1 is raised.
disk_usage_warning_level_2 10 Defines a percentage of available disk space, above the defined disk_low_space_level. If the available disk space falls below this level, the warning WARNING_DISK_USAGE_LEVEL_2 is raised.
disk_usage_warning_level_3 5 Defines a percentage of available disk space, above the defined disk_low_space_level. If the available disk space falls below this level, the warning WARNING_DISK_USAGE_LEVEL_3 is raised.
status_interval 10 Defines the frequency, in multiples of disk_sample_rate, status updates are written to the error log. For example, if status_interval = 10 and disk_sample_rate = 60 seconds, a status message is written to the log every 600 seconds.

Checking available disk space

Checking diskspace usage from the command line.

This task assumes the following:
  • You can connect to your DB System from the command line using a suitable client, such as MySQL Shell.
To check the used and available disk space of your DB System, do the following:
  1. Using the command line client of your choice, run the following command:
    select * from performance_schema.health_block_device;

    which returns data similar to the following:

    
    +-------------------------+---------------------+-------------+-----------------+-------------+-------------+
    | DEVICE                  | TIMESTAMP           | TOTAL_BYTES | AVAILABLE_BYTES | USE_PERCENT | MOUNT_POINT |
    +-------------------------+---------------------+-------------+-----------------+-------------+-------------+
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:12:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:13:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:14:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:15:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:16:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:17:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:18:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:19:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:20:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    | /dev/mapper/vg_db-lv_db | 2021-08-08 16:21:08 | 53656686592 |     51364134912 |        4.27 | /db         |
    The following data is presented:
    • DEVICE: device name.
    • TIMESTAMP: time the measurement was taken.
    • TOTAL_BYTES: total amount of storage on the device, in bytes.
    • AVAILABLE_BYTES: amount of available storage on the device, in bytes.
    • USE_PERCENT: percentage of disk space in use.
    • MOUNT_POINT: device mount point

    This log can be cleared using TRUNCATE TABLE.

Increasing DB System Storage

This section describes the tasks necessary to increase your DB System storage. The following tasks are available:

Increasing Storage by Backup and Restore

To create a backup of a DB System and restore the backup to a new DB System, do the following:
  1. Create a backup of the DB System.
    See Backing Up a DB System for more information.
  2. Create a new DB System from the backup. Define a larger amount of storage in the new DB System.
    See Creating a New DB System from a Backup for more information.

Increasing Storage by Export and Import

How to increase your DB System storage using MySQL Shell's import and export to a new DB System.

To export data from your DB System and import it into a DB System with more storage, do the following:
  1. Export the data from your DB System to Object Storage using MySQL Shell.
  2. To import the data from Object Storage to a new DB System, with more available storage, do one of the following: