Skip to main content

Instance Management

The following explains how to manage instances running in the MySQL service.

View instance list

You can check the list of instances included in the running MySQL instance group. For the relationship between instance groups and instances, refer to the Key Concepts.

  1. Go to 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 Instances menu.

    ItemDescription
    Instance NameThe MySQL instance group name followed by the number representing the creation order starting from 0.
    AZThe AZ (Availability Zone) where the instance is created.
    StatusCheck the status of the MySQL instance.
    - For more details, refer to Instance Lifecycle and Status Values.
    Availability StatusThis refers to the data replication status between MySQL instances and is only applicable if High Availability is selected.
    - For more details, refer to Instance Availability Status.
    RoleThe role of the instance.
    - For more details, refer to Instance Availability Configuration and Roles.
    Instance TypeThe type of MySQL instance selected during creation.
    Storage SizeThe storage size entered during creation.
    UptimeThe elapsed time since the instance was updated due to creation, restart, or failover actions.
    Creation DateThe date and time when the instance was created.

Monitor instances

In the Monitoring tab, you can check the monitoring results of the MySQL instance group.

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

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

  3. Go to the Monitoring tab.

    Image Instance Monitoring

    CategoryDescription
    Monitoring InstanceSelect the instance to monitor.
    Query ItemsChoose the monitoring items to view.
    - Items: MySQL, CPU, Memory, FileSystem, Disk, Network
    - By default, all items are displayed.
    - Multiple items can be selected.
    Data PeriodThe period for the data shown in the monitoring graph.
    - Options: 1 hour (default), 3 hours, 12 hours, 1 day, 7 days.
    View ModeSet the graph view mode.
    - Options: 1-tier, 2-tier, 3-tier.
    Auto Refresh IntervalSet the auto refresh interval.
    - Options: No auto refresh (default), 10 seconds, 30 seconds, 1 minute, 5 minutes.
    Manual RefreshClick to manually refresh the monitoring results.

    Monitor data provided
    ItemMonitoring DataDescription
    MySQLQueries per second (QPS)Queries executed per second over time.
    MySQLConnections (Count)The number of connections over time.
    - Max Connections: Maximum number of connections.
    - Active Connections: Maximum, current, and average number of connections over the specified period.
    MySQLSlow Queries (Count)Number of slow queries over time.
    MySQLQueries by Type (Count)Number of queries by type over time.
    MySQLRow Lock Wait (Count)Number of row lock waits over time.
    MySQLBinary Log (Bytes)The size of binary logs over time.
    - Active Binary Logs: Maximum, current, and average size of binary logs over the specified period.
    CPUTotal Usage (%)CPU usage over time.
    MemoryTotal Usage (%)Memory usage over time.
    MemoryUsage by Type (Bytes)Memory usage by type over time.
    FileSystemTotal Usage (%)FileSystem usage over time.
    FileSystemTotal Usage (Bytes)Total FileSystem usage over time.
    FileSystemInode Usage per Mount (%)Inode usage per mount in FileSystem over time.
    DiskRead Bytes (Bytes/sec)Disk IO read usage over time.
    DiskWrite Bytes (Bytes/sec)Disk IO write usage over time.
    DiskRead IOPS (IO/sec)Disk IO read IOPS over time.
    DiskWrite IOPS (IO/sec)Disk IO write IOPS over time.
    NetworkRX per Interface (Bytes)Network RX usage over time.
    NetworkTX per Interface (Bytes)Network TX usage over time.
    NetworkRX per Interface (PPS)Network RX usage per second over time.
    NetworkTX per Interface (PPS)Network TX usage per second over time.

Delete instances

You can delete MySQL Standby instances that are no longer in use. When you delete a MySQL instance, all operations on that instance will be terminated, and the instance's resources will be fully released.

caution

If all instances in an Availability Zone (AZ) are terminated, the endpoint in that AZ will be deactivated and no longer accessible.
Please make sure to check the connection information and the status of instances in the AZ before deleting them.

info

Instances can only be deleted when the instance group status is Available, Primary-Available, or Error.

  1. Go to KakaoCloud Console > Data Store > MySQL menu.
  2. In the Instance Group menu, select the instance group containing the instance you want to delete.
  3. In the Instances menu, click the [More Options] icon of the instance you want to delete, then select Delete Instance.
  4. In the Delete Instance popup, enter the necessary information and click the [Delete] button.

Configure MySQL instances

In the MySQL service, instance configuration includes the following settings.
A MySQL instance refers to a virtual machine managed by an instance group, where the role is determined as Primary or Standby based on availability. The following settings apply to MySQL instances. Functionality to change MySQL instance settings is planned for future release.

MySQL Instance Typeinnodb_buffer_pool_sizemax_connections
m2a.large      5G680
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 more detailed descriptions of instance roles and types, refer to Instances.

View slow query

Use monitoring service

You can view MySQL slow queries using the log explorer provided by KakaoCloud's monitoring service.

  1. Go to KakaoCloud Console > Monitoring menu.

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

  3. After confirming the query period, enter "*/mysql_log/slowlog/slowquery.log" in the File Path filter.

    Image

  4. After completing the search condition setup, you can view the search results in chart and log list formats.

info

For a detailed explanation of the log explorer, refer to the Log Explorer documentation.

Use stored procedure

You can view slow queries in a table through the default stored procedures provided by KakaoCloud MySQL.

info
  • If you use stored procedures, you cannot view slow queries via the KakaoCloud monitoring log explorer.
  • You must manage the table data manually, and retention settings are planned for future support.
  • Slow log tables may take some time to query, and they are not replicated, so the slow logs from the previous primary will not be transferred to the new primary after a primary switch.

For a detailed explanation of the stored procedures, refer to the Stored Procedure documentation.

  1. Change the slow query and general log settings (log_output) using the following procedure. If this procedure is used, slow queries cannot be checked via KakaoCloud's monitoring log explorer.

    CALL mysql.mnms_set_configuration('log_output', 'TABLE');
  2. Check the Slow Query.

    SELECT * FROM mysql.slow_log;
  3. Slow Query data is stored as a BLOB, and it can be retrieved with type conversion as follows:

    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 the log_output setting to its original state, enter the following:

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

Restart MySQL

You can restart MySQL for an active instance. Only instances from an Availability Single (Single) instance group can be restarted.

  • If the instance status is PENDING, STARTING, or TERMINATING, the restart cannot be performed.
  1. Go to the KakaoCloud Console > Data Store > MySQL menu.
  2. Select the MySQL instance group you want to restart in the Instance Group menu.
  3. Go to the Instance menu.
  4. Click the [More Options] icon of the instance to restart, then select Restart MySQL.
  5. In the MySQL Restart pop-up window, review the information and click the [Proceed] button.