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.
-
Go to KakaoCloud Console > Data Store > MySQL menu.
-
In the Instance Group menu, select the MySQL instance group whose instance list you want to view.
-
Go to the Instances menu.
Item Description Instance Name The MySQL instance group name
followed by the number representing the creation order starting from 0.AZ The AZ (Availability Zone) where the instance is created. Status Check the status of the MySQL instance.
- For more details, refer to Instance Lifecycle and Status Values.Availability Status This 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.Role The role of the instance.
- For more details, refer to Instance Availability Configuration and Roles.Instance Type The type of MySQL instance selected during creation. Storage Size The storage size entered during creation. Uptime The elapsed time since the instance was updated due to creation, restart, or failover actions. Creation Date The 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.
-
Go to KakaoCloud Console > Data Store > MySQL menu.
-
In the Instance Group menu, select the MySQL instance group you want to monitor.
-
Go to the Monitoring tab.
Instance Monitoring
Category Description Monitoring Instance Select the instance to monitor. Query Items Choose the monitoring items to view.
- Items: MySQL, CPU, Memory, FileSystem, Disk, Network
- By default, all items are displayed.
- Multiple items can be selected.Data Period The period for the data shown in the monitoring graph.
- Options: 1 hour (default), 3 hours, 12 hours, 1 day, 7 days.View Mode Set the graph view mode.
- Options: 1-tier, 2-tier, 3-tier.Auto Refresh Interval Set the auto refresh interval.
- Options: No auto refresh (default), 10 seconds, 30 seconds, 1 minute, 5 minutes.Manual Refresh Click to manually refresh the monitoring results.
Monitor data provided
Item Monitoring Data Description MySQL Queries per second (QPS) Queries executed per second over time. MySQL Connections (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.MySQL Slow Queries (Count) Number of slow queries over time. MySQL Queries by Type (Count) Number of queries by type over time. MySQL Row Lock Wait (Count) Number of row lock waits over time. MySQL Binary Log (Bytes) The size of binary logs over time.
- Active Binary Logs: Maximum, current, and average size of binary logs over the specified period.CPU Total Usage (%) CPU usage over time. Memory Total Usage (%) Memory usage over time. Memory Usage by Type (Bytes) Memory usage by type over time. FileSystem Total Usage (%) FileSystem usage over time. FileSystem Total Usage (Bytes) Total FileSystem usage over time. FileSystem Inode Usage per Mount (%) Inode usage per mount in FileSystem over time. Disk Read Bytes (Bytes/sec) Disk IO read usage over time. Disk Write Bytes (Bytes/sec) Disk IO write usage over time. Disk Read IOPS (IO/sec) Disk IO read IOPS over time. Disk Write IOPS (IO/sec) Disk IO write IOPS over time. Network RX per Interface (Bytes) Network RX usage over time. Network TX per Interface (Bytes) Network TX usage over time. Network RX per Interface (PPS) Network RX usage per second over time. Network TX 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.
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.
Instances can only be deleted when the instance group status is Available, Primary-Available, or Error.
- Go to KakaoCloud Console > Data Store > MySQL menu.
- In the Instance Group menu, select the instance group containing the instance you want to delete.
- In the Instances menu, click the [More Options] icon of the instance you want to delete, then select Delete Instance.
- 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 Type | innodb_buffer_pool_size | max_connections |
---|---|---|
m2a.large | 5G | 680 |
m2a.xlarge | 11G | 1360 |
m2a.2xlarge | 22G | 2730 |
m2a.4xlarge | 44G | 5460 |
m2a.8xlarge | 88G | 10920 |
m2a.12xlarge | 132G | 16380 |
m2a.16xlarge | 176G | 21840 |
m2a.24xlarge | 264G | 32760 |
r2a.large | 11G | 1360 |
r2a.xlarge | 22G | 2730 |
r2a.2xlarge | 44G | 5460 |
r2a.4xlarge | 88G | 10920 |
r2a.8xlarge | 176G | 21840 |
r2a.12xlarge | 264G | 32760 |
r2a.16xlarge | 352G | 43690 |
r2a.24xlarge | 528G | 65530 |
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.
-
Go to KakaoCloud Console > Monitoring menu.
-
Click the Explorer tab and select MySQL in the log explorer.
-
After confirming the query period, enter
"*/mysql_log/slowlog/slowquery.log"
in the File Path filter. -
After completing the search condition setup, you can view the search results in chart and log list formats.
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.
- 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.
-
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');
-
Check the Slow Query.
SELECT * FROM mysql.slow_log;
-
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; -
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
, orTERMINATING
, the restart cannot be performed.
- Go to the KakaoCloud Console > Data Store > MySQL menu.
- Select the MySQL instance group you want to restart in the Instance Group menu.
- Go to the Instance menu.
- Click the [More Options] icon of the instance to restart, then select Restart MySQL.
- In the MySQL Restart pop-up window, review the information and click the [Proceed] button.