--- title: "createCloudMysqlInstance" slug: "cli-vmysql-createcloudmysqlinstance" tags: ["Cloud DB for MySQL", "VPC"] updated: 2026-09-17T10:08:39Z published: 2026-09-17T10:08:39Z canonical: "cli.ncloud-docs.com/cli-vmysql-createcloudmysqlinstance" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createCloudMysqlInstance Available in VPC Creates a Cloud DB for MySQL instance. ## Syntax The `createCloudMysqlInstance` syntax is as follows: ``` ./ncloud vmysql createCloudMysqlInstance \ --vpcNo \ --subnetNo \ --cloudMysqlServiceName \ --cloudMysqlServerNamePrefix \ --cloudMysqlDatabaseName \ --cloudMysqlUserName \ --cloudMysqlUserPassword \ --hostIp \ [--cloudMysqlImageProductCode ] \ [--cloudMysqlProductCode ] \ [--engineVersionCode ] \ [--dataStorageTypeCode ] \ [--isStorageEncryption ] \ [--isHa ] \ [--isMultiZone ] \ [--standbyMasterSubnetNo ] \ [--isBackup ] \ [--isAutomaticBackup ] \ [--backupTime ] \ [--backupFileRetentionPeriod ] \ [--cloudMysqlPort ] \ [--isPrivateSubDomain ] \ [--privateSubDomainPrefix ] \ [--isDeleteProtection ] \ [--regionCode ] \ [--output ] ``` ## 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 - See [getCloudMysqlTargetVpcList](/docs/en/cli-vmysql-getcloudmysqltargetvpclist). | | `--subnetNo` | String | Required | Subnet number of the default network interface to be used in the Cloud DB for MySQL instance - Subscription to public domains can only be done in a DB server created in public subnet. - Subnet migrations are not available after creating the Cloud DB for MySQL instance. - See [getCloudMysqlTargetSubnetList](/docs/en/cli-vmysql-getcloudmysqltargetsubnetlist). | | `--cloudMysqlServiceName` | String | Required | Cloud DB for MySQL service name - Enter 3-30 characters, including English letters, Korean letters, numbers, and special character `-`. | | `--cloudMysqlServerNamePrefix` | String | Required | Prefix for the Cloud DB for MySQL server name - Enter 3-20 characters, including lowercase English letters, numbers, and special character `-`. - The string must begin with a lowercase English letter and end with a lowercase English letter or number. - A three-digit number is automatically generated after the prefix, and random text is added to prevent hostname duplication. - e.g., If the prefix is `test-123`: `test-123-001-4y1v`. | | `--cloudMysqlDatabaseName` | String | Required | DB name to be created by default in the Cloud DB for MySQL instance - Enter 1-30 characters, including English letters, numbers, and special characters `_` and `-`. - The string must begin with an English letter. | | `--cloudMysqlUserName` | String | Required | DB user account ID - Enter 3-16 characters, including English letters, numbers, and special character `-` and `_`. - The string must begin with an English letter. | | `--cloudMysqlUserPassword` | String | Required | DB user account password - Enter between 8 and 20 characters containing at least one English letter, number, and special character. - Special characters ``` `&` `+` `\` `"` `'` `/` and spaces can't be used. - If the password plugin is enabled, the policy set by the plugin must also be satisfied. | | `--hostIp` | String | Required | Host IP addresses to be allowed to connect to the MySQL server - Allow all: `%` - Specific IP: `1.1.1.1` - IP range: `1.1.1.%` - CIDR: `1.1.1.0/24` | | `--isMultiZone` | Boolean | Conditional | Multi-zone status - `true` \| `false` (default) - `true`: Create the master and standby master servers in separate zones to provide higher availability. - `false`: Multi-zone not enabled. - Required if `isHa`=`true`. | | `--standbyMasterSubnetNo` | String | Conditional | Subnet number of the standby master server - Must be entered for multi-zone Cloud DB for MySQL. - It must be in a different zone from the master server's subnet, but the public or private status must match. - See [getCloudMysqlTargetSubnetList](/docs/en/cli-vmysql-getcloudmysqltargetsubnetlist). | | `--backupTime` | String | Conditional | Set backup time (HH:MM). - Required if `isBackup`=`true` and `isAutomaticBackup`=`false`. - e.g., `01:15` (Backup starts between the selected time + 15 minutes.) | | `--privateSubDomainPrefix` | String | Conditional | Enter the sub domain to be added to the private domain. - Enter 3-15 characters, including English letters, numbers, and the special character `-` - The string must begin with an English letter and end with an English letter or number. - Required if `isPrivateSubDomain`=`true`. - The same sub domain policy will be added when adding a slave or recovery. | ### 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 - Automatically generated by NAVER Cloud Platform (default). - See [getCloudMysqlImageProductList](/docs/en/cli-vmysql-getcloudmysqlimageproductlist). | | `--cloudMysqlProductCode` | String | Optional | Cloud DB for MySQL product code - Determine the server specifications for the Cloud DB for MySQL instance. - Default: Minimum specifications (in the order of memory, CPU). - See [getCloudMysqlProductList](/docs/en/cli-vmysql-getcloudmysqlproductlist). | | `--engineVersionCode` | String | Optional | DB engine version - If not entered, it is created with the latest version currently available. - See [getCloudMysqlImageProductList](/docs/en/cli-vmysql-getcloudmysqlimageproductlist). | | `--dataStorageTypeCode` | String | Optional | Data storage type code - Valid values vary depending on the `generationCode` of `cloudMysqlImageProductCode`. - G2: `SSD` (default) \| `HDD` - G3: `CB2` (default) - You cannot change the data storage type after installation. | | `--isStorageEncryption` | Boolean | Optional | Data storage encryption application status (to be applied later) - `true` \| `false` (default) - When encryption is applied, the DB data is encrypted and saved in the storage. - Encryption can be applied only if `isHa`=`true`. - You can't change the storage encryption settings after creating a Cloud DB for MySQL instance. | | `--isHa` | Boolean | Optional | High availability status - `true` (default) \| `false` - `true`: It creates two servers, including a standby master server, and incurs additional fees. - `false`: `isMultiZone` and `standbyMasterSubnetNo` are unavailable. | | `--isBackup` | Boolean | Optional | Whether MySQL backup is enabled - `true` (default) \| `false` - If `isHa`=`true`, it is fixed to `true`. | | `--isAutomaticBackup` | Boolean | Optional | Whether to set the backup time automatically - `true` (default) \| `false` - If set to `true`, `backupTime` can't be entered. | | `--backupFileRetentionPeriod` | Integer | Optional | Backup file retention period (days) - `1` (default) - Backup is performed every day, and the backup file is stored in a separate backup storage. - Only backup for tables created with the InnoDB engine is supported. | | `--cloudMysqlPort` | Integer | Optional | TCP port number to access the Cloud DB for MySQL instance - `10000`-`20000` (default: `3306`) - The port number can't be changed after it is specified. | | `--isPrivateSubDomain` | Boolean | Optional | Whether to use private sub domains - `true` \| `false` - If set to `true`, `privateSubDomainPrefix` can be specified. | | `--isDeleteProtection` | Boolean | Optional | Cluster termination protection status - `true` \| `false` (default) - If `true`, the cluster can't be terminated. | ### Common options For information about the options common to all `vmysql` subcommands, see [Cloud DB for MySQL (VPC) options](/docs/en/cli-vmysql#%EC%98%B5%EC%85%98). ## 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" } } ```