Available in VPC
Creates a Cloud DB for MySQL instance.
Syntax
The createCloudMysqlInstance syntax is as follows:
./ncloud vmysql createCloudMysqlInstance \
--vpcNo <vpc-no> \
--subnetNo <subnet-no> \
--cloudMysqlServiceName <service-name> \
--cloudMysqlServerNamePrefix <server-name-prefix> \
--cloudMysqlDatabaseName <database-name> \
--cloudMysqlUserName <user-name> \
--cloudMysqlUserPassword <user-password> \
--hostIp <host-ip> \
[--cloudMysqlImageProductCode <image-product-code>] \
[--cloudMysqlProductCode <product-code>] \
[--engineVersionCode <engine-version-code>] \
[--dataStorageTypeCode <SSD|HDD|CB2>] \
[--isStorageEncryption <true|false>] \
[--isHa <true|false>] \
[--isMultiZone <true|false>] \
[--standbyMasterSubnetNo <standby-subnet-no>] \
[--isBackup <true|false>] \
[--isAutomaticBackup <true|false>] \
[--backupTime <hh:mm>] \
[--backupFileRetentionPeriod <retention-days>] \
[--cloudMysqlPort <port>] \
[--isPrivateSubDomain <true|false>] \
[--privateSubDomainPrefix <private-sub-domain-prefix>] \
[--isDeleteProtection <true|false>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running createCloudMysqlInstance.
Required options
The following options are required for createCloudMysqlInstance.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcNo |
String | Required | Number of VPC to create the Cloud DB for MySQL instance in |
--subnetNo |
String | Required | Subnet number of the default network interface to be used in the Cloud DB for MySQL instance
|
--cloudMysqlServiceName |
String | Required | Cloud DB for MySQL service name
|
--cloudMysqlServerNamePrefix |
String | Required | Prefix for the Cloud DB for MySQL server name
|
--cloudMysqlDatabaseName |
String | Required | DB name to be created by default in the Cloud DB for MySQL instance
|
--cloudMysqlUserName |
String | Required | DB user account ID
|
--cloudMysqlUserPassword |
String | Required | DB user account password
|
--hostIp |
String | Required | Host IP addresses to be allowed to connect to the MySQL server
|
--isMultiZone |
Boolean | Conditional | Multi-zone status
|
--standbyMasterSubnetNo |
String | Conditional | Subnet number of the standby master server
|
--backupTime |
String | Conditional | Set backup time (HH:MM).
|
--privateSubDomainPrefix |
String | Conditional | Enter the sub domain to be added to the private domain.
|
Optional options
These are the optional options for createCloudMysqlInstance. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--cloudMysqlImageProductCode |
String | Optional | Cloud DB for MySQL image product code
|
--cloudMysqlProductCode |
String | Optional | Cloud DB for MySQL product code
|
--engineVersionCode |
String | Optional | DB engine version
|
--dataStorageTypeCode |
String | Optional | Data storage type code
|
--isStorageEncryption |
Boolean | Optional | Data storage encryption application status (to be applied later)
|
--isHa |
Boolean | Optional | High availability status
|
--isBackup |
Boolean | Optional | Whether MySQL backup is enabled
|
--isAutomaticBackup |
Boolean | Optional | Whether to set the backup time automatically
|
--backupFileRetentionPeriod |
Integer | Optional | Backup file retention period (days)
|
--cloudMysqlPort |
Integer | Optional | TCP port number to access the Cloud DB for MySQL instance
|
--isPrivateSubDomain |
Boolean | Optional | Whether to use private sub domains
|
--isDeleteProtection |
Boolean | Optional | Cluster termination protection status
|
Common options
For information about the options common to all vmysql subcommands, see Cloud DB for MySQL (VPC) options.
Examples
If the request to create a Cloud DB for MySQL instance is successful, the instance's configuration information and creation status are returned.
Command
The command example is as follows:
./ncloud vmysql createCloudMysqlInstance \
--vpcNo 98765432 \
--subnetNo 23456789 \
--cloudMysqlServiceName test-mysql \
--cloudMysqlServerNamePrefix testmysql \
--cloudMysqlDatabaseName testdb \
--cloudMysqlUserName testuser \
--cloudMysqlUserPassword Examplepw123! \
--hostIp % \
--cloudMysqlImageProductCode SW.VMYSL.OS.LNX64.ROCKY.0810.MYSQL.B050 \
--cloudMysqlProductCode SVR.VDBAS.HICPU.C002.M004.NET.HDD.B050.G002 \
--engineVersionCode 8.0.36 \
--isHa true \
--isMultiZone true \
--standbyMasterSubnetNo 23456790 \
--cloudMysqlPort 13306 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"createCloudMysqlInstanceResponse": {
"totalRows": 1,
"cloudMysqlInstanceList": [
{
"cloudMysqlInstanceNo": "12345678",
"cloudMysqlServiceName": "test-mysql",
"cloudMysqlInstanceStatusName": "creating",
"cloudMysqlInstanceStatus": {
"code": "INIT",
"codeName": "CLOUD DATABASE (VPC) Init status"
},
"cloudMysqlInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Creat OP"
},
"cloudMysqlImageProductCode": "SW.VMYSL.OS.LNX64.ROCKY.0810.MYSQL.B050",
"engineVersion": "MYSQL8.0.36",
"license": {
"code": "GPL",
"codeName": "License code - CLOUD DATABASE (VPC)"
},
"cloudMysqlPort": 13306,
"isHa": true,
"isMultiZone": true,
"isBackup": true,
"backupFileRetentionPeriod": 1,
"backupTime": "00:00",
"generationCode": "G2",
"createDate": "2026-06-04T16:50:56+0900",
"accessControlGroupNoList": [],
"cloudMysqlConfigList": [],
"cloudMysqlServerInstanceList": [
{
"cloudMysqlServerName": "testmysql-001-97mj",
"cloudMysqlServerRole": {
"code": "M",
"codeName": "Master"
},
"cloudMysqlServerInstanceStatusName": "creating",
"cloudMysqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE (VPC) server Pending status"
},
"cloudMysqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE (VPC) server Create OP"
},
"cloudMysqlProductCode": "SVR.VDBAS.HICPU.C002.M004.NET.HDD.B050.G002",
"regionCode": "KR",
"zoneCode": "KR-1",
"vpcNo": "98765432",
"subnetNo": "23456789",
"isPublicSubnet": false,
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": false,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296,
"createDate": "2026-06-04T16:50:56+0900"
},
{
"cloudMysqlServerName": "testmysql-002-97mk",
"cloudMysqlServerRole": {
"code": "H",
"codeName": "Standby Master"
},
"cloudMysqlServerInstanceStatusName": "creating",
"cloudMysqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE (VPC) server Pending status"
},
"cloudMysqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE (VPC) server Create OP"
},
"cloudMysqlProductCode": "SVR.VDBAS.HICPU.C002.M004.NET.HDD.B050.G002",
"regionCode": "KR",
"zoneCode": "KR-2",
"vpcNo": "98765432",
"subnetNo": "23456790",
"isPublicSubnet": false,
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": false,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 4294967296,
"createDate": "2026-06-04T16:50:56+0900"
}
]
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}