Creating and Managing Instance Groups
Create MySQL instance group
A MySQL Instance Group is an object that manages the lifecycle of instances and backups. It has various status values, including operational and termination states, which users can check and manage.
Here’s how to create an instance group in MySQL service:
There are no limits on the number of MySQL instance groups or the number of instances that can be created per project.
-
Go to KakaoCloud Console > Data Store > MySQL menu.
-
Click the [Create Instance Group] button.
-
Enter the information in the Create Instance Group section and click the [Create] button.
Item Type Description Basic Settings Instance Group Name The name of the MySQL instance group
- The same instance group name cannot be used within the same project
- Example: mysql-instance-01Description (Optional) You can enter up to 100 characters as an additional description for the instance group Instance Availability High Availability (Primary, Standby Instances) You can create a Primary instance and multiple Standby instances
- Single AZ or multiple AZSingle (Primary Instance) Only a single Primary instance can be created
- Only a single AZ (Availability Zone) can be usedMySQL Settings Engine Version The MySQL database version is selected automatically
- Available MySQL database versions are 8.0.34 and 8.0.41Primary Port The port used to communicate with the MySQL Primary instance, can be set between 1024 and 65535, default is 3306
Reserved ports (e.g., 33060) are unavailableStandby Port The port used to communicate with the MySQL Standby instance, can be set between 1024 and 65535, required if high availability is selected, default is 3307
Reserved ports (e.g., 33060) are unavailableMySQL Username The MySQL database user account name
- Example: admin
* Reserved account names likeroot
are not allowed
* For more details about user permissions, refer to Instance Group User AccountsMySQL Password The initial password for the MySQL database administrator account
- Format: 8-16 characters
- Spaces,/
,'
,"
,@
characters are not allowed
⚠️ The administrator account password can be changed after the database is running
⚠️ The password changed by the user after the database is running cannot be verifiedParameter Group You can select a parameter group that matches the selected engine version Instance Type Select the instance type for configuring database compute resources
- For more details, refer to Instance TypesDefault Storage SSD Set the type and size of the volume used for the database
- Volume type: Currently, only SSD type is supported, but other types will be supported in the future
- Volume size: Can be between 100 GB to 16,384 GB
* Minimum capacity limits may vary depending on the selected instance type.Log Storage SSD The storage used for logging in the database. Once created, the type cannot be changed
- Volume type: Currently, only SSD type is supported, but other types will be supported in the future
- Volume size: Can be between 100 GB to 16,384 GB
* Minimum capacity limits may vary depending on the selected instance type.Network Settings Multi-AZ Option If high availability is selected, this option allows you to specify subnets and the number of instances to create per AZ VPC Select the network where the MySQL instance will be configured Subnet and Instance Count Configuration Select the subnet and specify the number of instances in the table
For single availability, only one instance can be created, and for high availability, up to 6 instances (including Primary and Standby instances) can be createdSubnet for Primary
Select the subnet for the Primary instance and specify the number of instances
In case of single availability, only 1 Primary instance can be created, for high availability, at least 2 instances including 1 Primary instance are recommendedSubnet for Standby
Select the subnet for the Standby instance and specify the number of instances
Only available when using the multi-AZ option, additional subnets can be added for Standby instances by clicking the "Add Subnet" buttonAdd Subnet Add as many subnets as the number of availability zones Security Group Create a new security group or select an existing one to apply to the instance group
- Multiple selections allowedAuto Backup Auto Backup Option Whether to enable auto backup, if enabled, backup will occur automatically once a day Backup Retention Period Select the retention period for automatic backups, from 1 to 35 days
- Changes the retention period for all automatic backups of the instance groupAuto Backup Start Time Set the start time for automatic backups, backups will start within 15 minutes of the selected time Additional Settings Table Case Sensitivity The parameter (lower_case_table_names) to distinguish between case sensitivity in table names. This setting is applied separately from the parameter group and cannot be changed after the instance group is created
For more detailed information about instance groups, please refer to Instance Group.
- If the creation of the instance group fails due to unexpected issues such as network errors or resource shortages, you can check the logs in Cloud Trail.
- Even after extending the volume of the instance group, the maximum IOPS remains fixed to the initially specified value. To maintain stable performance, please set the appropriate volume size.
Instance group user accounts
In MySQL, when creating an instance group, a user account is created based on the user-specified ID and password.
This account has the User Admin
role and can access resources after authentication. The role and permissions of the user account are as follows.
- This information applies only to the kr-central-2 region.
- If custom permissions are granted to the user account to change settings, it may cause issues with internal management actions.
When granting permissions to user accounts, please refer to the Stored Procedure officially provided by KakaoCloud.
Type | Role | Permissions |
---|---|---|
User Account | User Admin | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, CREATE ROLE, DROP ROLE ON . TO admin @% GRANT FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,REPLICATION_APPLIER,SENSITIVE_VARIABLES_OBSERVER,SET_USER_ID,SHOW_ROUTINE,XA_RECOVER_ADMIN ON . TO admin @% |
Connect to MySQL instance group
After creating the MySQL instance group and completing the instance setup, you can connect to the MySQL instance group using the MySQL Client. Here's how to connect to an instance group in the MySQL service:
Prerequisite
To connect to a MySQL instance group, the following environment setup is required:
- A Virtual Machine (VM) instance that uses the same network as the MySQL instance group
- An access environment that can reach the MySQL instance group’s endpoint
For this, the Outbound policy of the Virtual Machine instance's Security Group should allow the user-defined port (1024 ~ 65535) or the Primary instance TCP 3306, Standby instance TCP 3307 (default MySQL ports).
Connect to instance
You can connect the instance to the instance group.
-
Refer to Virtual Machine > Create and Connect Instance to access the virtual machine instance and prepare the MySQL Client. If the MySQL command is not recognized, you need to install a separate MySQL Client.
-
Navigate to KakaoCloud Console and go to Data Store > MySQL menu.
-
In the Instance Group menu, select the instance group to which you want to connect.
-
In the Details tab, check the Endpoint and DB Username. Copy this information to your clipboard as it is required to execute MySQL commands.
MySQL Instance Group Details
-
To connect to the instance group using MySQL Client, execute the MySQL connection command from the created virtual machine instance:
MySQL Connection Commandmysql --user={USER} --password={USER_PASSWORD} --host {ENDPOINT} --port {PORT}
Item Description user {USER}
: The DB username obtained in step 2
- The name of the DB admin account used to connect to the MySQL instancepassword {USER_PASSWORD}
: The initial password for the MySQL instance admin account
- The password entered when creating MySQLhost {ENDPOINT}
: The endpoint information obtained from the Details tab
- The endpoint associated with the MySQL instanceport {PORT}
: The port number set when creating the instance group
For detailed descriptions of the roles and types of instances, please refer to Instance.
The MySQL endpoint is provided as a DNS-based FQDN. To enable this, make sure the Outbound policy of the Security Group allows udp/53
port. The IP mapped to this domain name may change during failover, so please take note of the following:
- The MySQL endpoint domain name should not be cached (TTL should be 0 seconds).
(Example) For Java-based applications, set TTL:
networkaddress.cache.ttl=0
- When performing a Primary switch, existing connections will be terminated, so ensure automatic reconnection is configured for high availability.
Manage instance group
The following explains how to manage the MySQL instances and instance groups running in the service.
View MySQL instance group list
You can view the list of MySQL instance groups that are currently running.
-
Go to KakaoCloud Console > Data Store > MySQL.
-
In the Instance Group menu, check the list of instance groups.
Category Description Instance Group Name The MySQL instance group name entered during creation
- Click the instance group to view its detailsStatus Check the status of the MySQL instance group
- For more details, refer to Instance GroupEngine Version The version of MySQL selected during creation Instance Type The type of MySQL instance selected during creation Availability The availability selected for the instance Multi-AZ Whether Multi-AZ is used Auto Backup Retention Period The retention period for automatic backups
- Hover the mouse to check the start timeCreation Date The date and time the MySQL instance group was created Creator The user who initially created the MySQL instance [More Options] Icon Auto Backup Settings: Auto backup settings, usage status, retention period, and backup start time settings for the instance group
Volume Expansion: Expansion of MySQL instance group volumes (basic and log storage)
Parameter Group Change: Change the parameter group applied to the instance group
Standby Add: Add a standby instance to the instance group, more details can be found in Adding Standby
Manual Failover: Perform a failover for the instance group
Backup Creation: Create a backup for the instance group
Delete Instance Group: Release the resources and delete backups associated with the MySQL instance group
View MySQL instance group details
You can view detailed information about a MySQL instance group.
Due to the characteristics of the file system, there may be a discrepancy between the displayed storage usage and the actual available capacity at the top of the detail page.
Monitoring metrics for capacity management will be provided in the future.
-
Go to KakaoCloud Console > Data Store > MySQL.
-
In the Instance Group menu, select the MySQL instance group whose details you want to view.
-
Check the detailed information of the selected MySQL instance group.
Expand MySQL instance group volumes
You can expand the volumes of a MySQL instance group. Both the basic and log storage volumes can be expanded up to 16TB (16,384 GB).
Volume expansion increases disk capacity, but the maximum IOPS will not increase. Features to increase maximum IOPS according to the expanded volume size will be supported in the future.
- Go to KakaoCloud Console > Data Store > MySQL.
- In the Instance Group menu, click the [More Options] icon for the instance group whose volume you want to expand, then select Volume Expansion.
- Enter the storage size you want to expand for either basic or log storage and click the [Confirm] button.
Delete MySQL instance groups
You can delete MySQL instance groups that are no longer in use.
When you delete a MySQL instance group, all instances in that group will be terminated, and the resources for your instances will be fully released. Once the instance group is deleted, no resource usage charges will be billed.
Note that manual backups in the MySQL instance group will not be deleted, but automatic backups will be deleted. If you need to preserve automatic backup retention, check the option to retain backups during the deletion popup.
Once a MySQL instance group is deleted, its instance resources and backups will be fully released and cannot be recovered.
- Go to KakaoCloud Console > Data Store > MySQL.
- In the Instance Group menu, click the [More Options] icon for the MySQL instance group you want to delete, and select Delete Instance Group.
- In the Delete Instance Group popup, enter the necessary information and click the [Delete] button.
Change parameter group
You can change the parameter group associated with an instance group.
Make sure to select the parameter group that matches the engine version of the instance group. Changing the parameter values may affect the operation of the MySQL service, so it is recommended to confirm the parameter values before applying any changes.
If a parameter group change is already in progress, additional change requests may fail. For more details, refer to the Parameter Group Creation and Management guide.
- Go to KakaoCloud Console > Data Store > MySQL.
- In the Instance Group menu, click the [More Options] icon for the instance group whose parameter group you want to change, and select Change Parameter Group.
- In the Change Parameter Group popup, select the parameter group you want to apply and click the [Confirm] button.