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.

addCloudMysqlUserList

Prev Next

Available in VPC

Add a DB user to a Cloud DB for MySQL instance.

Syntax

The addCloudMysqlUserList syntax is as follows:

./ncloud vmysql addCloudMysqlUserList \
    --cloudMysqlInstanceNo <instance-no> \
    --cloudMysqlUserList <user-config> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running addCloudMysqlUserList.

Required options

The following options are required for addCloudMysqlUserList.

Options Type Required Description
--cloudMysqlInstanceNo String Required Cloud DB for MySQL instance number
--cloudMysqlUserList List Required List of DB users to add
  • For each user, enter {field=‘value’} pairs within quotation marks, separated by commas.
    • name (required): DB user account ID. Enter 3-16 characters using English letters, numbers, and special character - and _. The string must start with an English letter.
    • password (required): DB user account password. Enter 8 to 20 characters containing at least one English letter, number, and special character. The 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 (required): Host IP addresses allowed to connect to the server. Allow all: %, Specific IP: 1.1.1.1, IP range: 1.1.1.%, CIDR: 1.1.1.0/24
    • authority (required): DB user permissions. READ (data query only) | CRUD (data entry, query, modification, and change available) | DDL (table creation, deletion, and change including the CRUD permission available)
    • isSystemTableAccess (optional): System table accessibility. true (default) | false

Common options

For information about the options common to all vmysql subcommands, see Cloud DB for MySQL (VPC) options.

Examples

If the request to add a DB user is successful, the specified user will be added to the Cloud DB for MySQL instance.

Command

The command example is as follows:

./ncloud vmysql addCloudMysqlUserList \
    --cloudMysqlInstanceNo 12345678 \
    --cloudMysqlUserList "name='testuser2', password='Examplepw123!', hostIp='%', authority='READ', isSystemTableAccess='false'" \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "addCloudMysqlUserListResponse": {
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}