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.
-
Go to the 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 Instance menu.
Item Description Instance name Name entered at creation in the format MySQL instance group name
-sequence number starting from 0
AZ Availability zone where the instance was created Status MySQL instance status
- For details, see Instance lifecycle and status valuesAvailability status State of data replication between MySQL instances, applicable only when High availability
is selected
- For details, see Instance availability statusRole Role of the instance
- For details, see Instance availability configuration and rolesInstance type MySQL instance type selected at creation Storage size Storage size entered at creation Uptime Elapsed time since the instance was created or updated due to restart or failover Created at Creation date and time of the instance
Monitor instances
In the Monitoring tab, you can check monitoring results for MySQL instance groups.
-
Go to the KakaoCloud Console > Data Store > MySQL menu.
-
In the Instance group menu, select the MySQL instance group to monitor.
-
Select the Monitoring tab.
Instance monitoringItem Description Monitored instance Select the instance to monitor Metrics Select monitoring metrics
- Options: MySQL / CPU / Memory / FileSystem / Disk / Network
- All metrics are shown by default
- Multiple metrics can be selectedTime range Period of data displayed in the monitoring graph
- Options: 1 hour (default) / 3 hours / 12 hours / 1 day / 7 daysView mode Layout of monitoring graphs
- 1-column, 2-column, 3-columnAuto-refresh interval Interval for automatic refresh
- Options: Do not refresh (default) / 10 sec / 30 sec / 1 min / 5 minManual refresh Refresh monitoring results on demand Provided monitoring data
Category Metric Description MySQL Queries per second (QPS) Number of queries per second over time MySQL Connections (count) Number of connections over time
- Max connections: maximum allowed
- Active connections: max, current, and average during selected periodMySQL Slow queries (count) Number of slow queries over time MySQL Queries by type (5 min interval) Number of queries by type over time MySQL Row lock waits (count) Number of row lock waits over time MySQL Binary log (bytes) Binary log size over time
- Active binary log: max, current, and average during selected periodCPU Total usage (%) Total CPU usage over time Memory Total usage (%) Total memory usage over time Memory Usage by type (bytes) Memory usage by type over time FileSystem Total usage (%) Total file system usage over time FileSystem Total usage (bytes) File system usage in bytes over time FileSystem Inode usage by mount (%) Inode usage by mount over time Disk Read bytes (bytes/sec) Disk I/O read usage over time Disk Write bytes (bytes/sec) Disk I/O write usage over time Disk Read IOPS (IO/sec) Disk I/O read IOPS over time Disk Write IOPS (IO/sec) Disk I/O write IOPS over time Network RX by interface (bytes) Network RX usage over time Network TX by interface (bytes) Network TX usage over time Network RX by interface (pps) Network RX usage in packets per second Network TX 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.
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.
You can delete instances only when the instance group status is Available, Primary-Available, or Error.
- Go to the KakaoCloud Console > Data Store > MySQL menu.
- In the Instance group menu, select the group that contains the instance you want to delete.
- In the Instance menu, select [More] > Delete instance for the instance.
- 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 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 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.
-
Go to the KakaoCloud Console > Monitoring menu.
-
Click the Explorer tab, and select MySQL in the log explorer.
-
After checking the query period, enter
"*/mysql_log/slowlog/slowquery.log"
in File path under Log filter. -
Once the search conditions are set, check results in both chart and log list formats.
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.
- 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.
-
Change the slow query and general log setting (log_output) using the configuration procedure.
CALL mysql.mnms_set_configuration('log_output', 'TABLE');
-
Query slow queries.
SELECT * FROM mysql.slow_log;
-
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; -
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.
- 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.
- Go to the KakaoCloud Console > Data Store > MySQL menu.
- In the Instance group menu, select the MySQL instance group to restart.
- Go to the Instance menu.
- Click [More] > Restart instance for the target instance, or select multiple instances and click Restart instance.
- In the Restart instance popup, check the information and click [Confirm].