Update a MySQL database
PATCH/v2/ mysql-databases/ {mysqlDatabaseId}/
v2
PATCH
database-patch-mysql-database
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PATCH \
-d '{"characterSettings":{"characterSet":"utf8mb4","collation":"utf8mb4_general_ci"},"description":"I am a database","version":8.1}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/mysql-databases/string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.database.patchMysqlDatabase({
"mysqlDatabaseId": "string",
"data": {
"characterSettings": {
"characterSet": "utf8mb4",
"collation": "utf8mb4_general_ci"
},
"description": "I am a database",
"version": 8.1
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Database\PatchMysqlDatabase\PatchMysqlDatabaseRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Database\PatchMysqlDatabase\PatchMysqlDatabaseRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// PatchMysqlDatabaseRequestBody to learn how to construct a valid instance
$body = new PatchMysqlDatabaseRequestBody(/* TODO: ... */);
$request = (new PatchMysqlDatabaseRequest(
mysqlDatabaseId: "string",
body: $body
));
$response = $client->database()->patchMysqlDatabase($request);
var_dump($response->getBody();