This API (CdbMysqlInit) is used to initialize Cloud Database instances, during which the character set, port, case sensitivity and the password of root account can be set. The instance is available after the initialization.
Domain for API request: cdb.api.qcloud.com
The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is CdbMysqlInit.
Parameter Name | Required | Type | Description |
---|---|---|---|
cdbInstanceId | Yes | String | Instance ID, such as: cdb-c1nl9rpv. It is identical to the instance ID displayed in the Cloud Database console page and can be obtained using API Query List of Instances. Its value equals to the uInstanceId field value in the output parameter. |
charset | Yes | String | Character set; possible values include: [latin1, utf8, gbk, utf8mb4] |
port | Yes | Int | Custom port, value range: [1024-65535] |
lowerCaseTableNames | Yes | Int | Whether the table name only be saved in lowercase. Possible returned values: 1 - Only saved in lowercase; 0 - Case-sensitive |
password | Yes | String | Password of root account, which should be a combination of 8-16 characters comprised of at least two of the following types: letters, numbers, special characters (!, @, #, $, %, ^, *, ()) |
Parameter Name | Type | Description |
---|---|---|
code | Int | Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page. |
message | String | Module error message description depending on API. |
codeDesc | String | Error description |
jobId | Int | Task ID. You can use API Query Asynchronous Tasks Initialization Details to query the task details. |
The following error codes only include the business logic error codes for this API.
Error Code | Error Message | Error Description |
---|---|---|
9003 | InvalidParameter | Incorrect parameter |
9006 | InternalError | Database internal error |
9587 | InvalidParameter | Wrong password |
9590 | InternalFailure | Task database access error |
9593 | IncorrectInstanceStatus | Abnormal instance status |
Input
https://cdb.api.qcloud.com/v2/index.php?Action=CdbMysqlInit &<Common request parameters> &cdbInstanceId=cdb-c1nl9rpv &charset=utf8 &port=3306 &password=cloud123456 &lowerCaseTableNames=0
Output
{
"code":"0",
"message":"",
"codeDesc":"Success",
"jobId":"12894"
}
Was this page helpful?