Modifying Database Parameters
Function
This API is to modify database parameters.
Constraints
- This API can be called only for MySQL migration and MySQL DR.
- This API can be called only when job_direction is set to up and the task status is CONFIGURATION.
- This API can be called only after the API in Obtaining Database Parameters in Batches is successfully called.
- In the dual-active DR scenario, the parent task cannot call the API.
URI
POST /v3/{project_id}/jobs/{job_id}/params
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| job_id | Yes | String | Task ID. | 
| project_id | Yes | String | Project ID of a tenant in a region For details about how to obtain the project ID, see Obtaining a Project ID. | 
Request Parameters
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| Content-Type | Yes | String | The content type. The default value is application/json. | 
| X-Auth-Token | Yes | String | User token obtained from IAM. | 
| X-Language | No | String | Request language type Default value: en-us Values: 
 | 
| Parameter | Mandatory | Type | Description | 
|---|---|---|---|
| group | Yes | String | Parameter Groups Values: 
 | 
| params | Yes | Array of objects | Information about the parameters to be modified. For details, see Table 4. | 
Response Parameters
Status code: 202
| Parameter | Type | Description | 
|---|---|---|
| success | Boolean | Whether the parameters are modified. | 
| should_restart | String | Whether the instance needs to be restarted. Values: 
 | 
| error_code | String | Error code. | 
| error_msg | String | Error message. | 
Example Request
Changing the value of binlog_stmt_cache_size to 32678 and bulk_insert_buffer_size to 8388608
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/140b5236-88ad-43c8-811c-1268453jb101/params
{
  "group" : "performance",
  "params" : [ {
    "key" : "binlog_stmt_cache_size",
    "target_value" : "32678"
  }, {
    "key" : "bulk_insert_buffer_size",
    "target_value" : "8388608"
  } ]
}
 Example Response
Status code: 202
Accepted
{
  "success" : true,
  "should_restart" : "false"
}
 Status Code
| Status Code | Description | 
|---|---|
| 202 | Accepted | 
| 400 | Bad Request | 
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
 
    