Skip to main content

Manage instances

This section explains how to manage running instances in the MySQL service.

View instance list

You can check the list of instances included in a running MySQL instance group.
For the relationship between instance groups and instances, see Key concepts.

  1. Go to the KakaoCloud Console > Data Store > MySQL menu.

  2. In the Instance group menu, select the MySQL instance group whose instance list you want to view.

  3. Go to the Instance menu.

    ItemDescription
    Instance nameName entered at creation in the format MySQL instance group name-sequence number starting from 0
    AZAvailability zone where the instance was created
    StatusMySQL instance status
    - For details, see Instance lifecycle and status values
    Availability statusState of data replication between MySQL instances, applicable only when High availability is selected
    - For details, see Instance availability status
    RoleRole of the instance
    - For details, see Instance availability configuration and roles
    Instance typeMySQL instance type selected at creation
    Storage sizeStorage size entered at creation
    UptimeElapsed time since the instance was created or updated due to restart or failover
    Created atCreation date and time of the instance

Monitor instances

In the Monitoring tab, you can check monitoring results for MySQL instance groups.

  1. Go to the KakaoCloud Console > Data Store > MySQL menu.

  2. In the Instance group menu, select the MySQL instance group to monitor.

  3. Select the Monitoring tab.

    Image
    Instance monitoring

    ItemDescription
    Monitored instanceSelect the instance to monitor
    MetricsSelect monitoring metrics
    - Options: MySQL / CPU / Memory / FileSystem / Disk / Network
    - All metrics are shown by default
    - Multiple metrics can be selected
    Time rangePeriod of data displayed in the monitoring graph
    - Options: 1 hour (default) / 3 hours / 12 hours / 1 day / 7 days
    View modeLayout of monitoring graphs
    - 1-column, 2-column, 3-column
    Auto-refresh intervalInterval for automatic refresh
    - Options: Do not refresh (default) / 10 sec / 30 sec / 1 min / 5 min
    Manual refreshRefresh monitoring results on demand
    Provided monitoring data
    CategoryMetricDescription
    MySQLQueries per second (QPS)Number of queries per second over time
    MySQLConnections (count)Number of connections over time
    - Max connections: maximum allowed
    - Active connections: max, current, and average during selected period
    MySQLSlow queries (count)Number of slow queries over time
    MySQLQueries by type (5 min interval)Number of queries by type over time
    MySQLRow lock waits (count)Number of row lock waits over time
    MySQLBinary log (bytes)Binary log size over time
    - Active binary log: max, current, and average during selected period
    CPUTotal usage (%)Total CPU usage over time
    MemoryTotal usage (%)Total memory usage over time
    MemoryUsage by type (bytes)Memory usage by type over time
    FileSystemTotal usage (%)Total file system usage over time
    FileSystemTotal usage (bytes)File system usage in bytes over time
    FileSystemInode usage by mount (%)Inode usage by mount over time
    DiskRead bytes (bytes/sec)Disk I/O read usage over time
    DiskWrite bytes (bytes/sec)Disk I/O write usage over time
    DiskRead IOPS (IO/sec)Disk I/O read IOPS over time
    DiskWrite IOPS (IO/sec)Disk I/O write IOPS over time
    NetworkRX by interface (bytes)Network RX usage over time
    NetworkTX by interface (bytes)Network TX usage over time
    NetworkRX by interface (pps)Network RX usage in packets per second
    NetworkTX by interface (pps)Network TX usage in packets per second

Delete instances

You can delete MySQL standby instances that are no longer in use. When a MySQL instance is deleted, all operations stop and the instance resources are fully released. Deleted MySQL instance resources cannot be recovered.

caution

If all instances in an availability zone are deleted, the endpoint in that AZ is deactivated and access is no longer possible.
Check the connection information and the instance status in the AZ before deletion.

info

You can delete instances only when the instance group status is Available, Primary-Available, or Error.

  1. Go to the KakaoCloud Console > Data Store > MySQL menu.
  2. In the Instance group menu, select the group that contains the instance you want to delete.
  3. In the Instance menu, select [More] > Delete instance for the instance.
  4. In the Delete instance popup, enter the required information and click [Delete].

Configure MySQL instances

MySQL instances are virtual machines (VMs) managed by instance groups. Depending on availability configuration, their role is Primary or Standby.
Configuration values for MySQL instances are as follows. Instance configuration changes will be supported in the future.

MySQL instance typeinnodb_buffer_pool_sizemax_connections
m2a.large5G680
m2a.xlarge11G1360
m2a.2xlarge22G2730
m2a.4xlarge44G5460
m2a.8xlarge88G10920
m2a.12xlarge132G16380
m2a.16xlarge176G21840
m2a.24xlarge264G32760
r2a.large11G1360
r2a.xlarge22G2730
r2a.2xlarge44G5460
r2a.4xlarge88G10920
r2a.8xlarge176G21840
r2a.12xlarge264G32760
r2a.16xlarge352G43690
r2a.24xlarge528G65530
info

For details about instance roles and types, see Instance.

View slow queries

Use monitoring service

You can check MySQL slow queries through the log explorer in the KakaoCloud Monitoring service.

  1. Go to the KakaoCloud Console > Monitoring menu.

  2. Click the Explorer tab, and select MySQL in the log explorer.

  3. After checking the query period, enter "*/mysql_log/slowlog/slowquery.log" in File path under Log filter.

    Image

  4. Once the search conditions are set, check results in both chart and log list formats.

Info

For details on the log explorer, see Log explorer.

Use stored procedure

You can also query slow queries in tables using the default stored procedures provided by KakaoCloud MySQL.

info
  • When using stored procedures, you cannot check slow queries through the KakaoCloud Monitoring log explorer.
  • Table data requires user management, and retention period settings will be supported in the future.
  • The slow log table may take time to query, and it is not replicated. When the primary changes, the previous primary's slow log is not loaded into the new primary.

For more details, see Stored Procedure.

  1. Change the slow query and general log setting (log_output) using the configuration procedure.

    CALL mysql.mnms_set_configuration('log_output', 'TABLE');
  2. Query slow queries.

    SELECT * FROM mysql.slow_log;
  3. Since slow query information is stored as BLOB, convert it as follows to check.

    SELECT start_time, user_host, query_time, lock_time, rows_sent, rows_examined, db, last_insert_id, insert_id, server_id, CONVERT(sql_text USING utf8), thread_id
    FROM mysql.slow_log;
  4. To restore log_output to the original setting:

    CALL mysql.mnms_set_configuration('log_output', 'FILE');

Restart instances

You can restart instances in an instance group.
During restart, access through endpoints becomes unavailable and service interruption may occur. Check carefully before proceeding, as this may affect services using the instance.

caution
  • If you restart both standby instances and the primary instance, all standby instances restart first, followed by the primary instance. Switching then occurs, closing all sessions and making endpoint access unavailable.
  • If you restart only the primary instance, it restarts without switching. All sessions are closed and the primary endpoint becomes unavailable. Until the restart is complete, the service is unavailable and downtime will occur, so proceed with caution.
  1. Go to the KakaoCloud Console > Data Store > MySQL menu.
  2. In the Instance group menu, select the MySQL instance group to restart.
  3. Go to the Instance menu.
  4. Click [More] > Restart instance for the target instance, or select multiple instances and click Restart instance.
  5. In the Restart instance popup, check the information and click [Confirm].