Skip to main content
MySQL Management

Create a MySQL database and optionally create/grant a user

Asynchronous Request

Creates a MySQL database on the selected server. Optionally provide dbUser to grant privileges for that database. If dbUser does not already exist in Webdock metadata for this server, dbUserPassword is required and a new user is created before privileges are granted.

This operation manages the MySQL installation attached to this specific Webdock server and follows the existing Dashboard workflow.

POST
/servers/{serverSlug}/mysql/databases
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

serverSlugstringrequired

Slug of the server whose MySQL installation is being managed

Body

application/json

MySQL database create payload for a specific server

dbNamestringrequired

Database name. Alphanumeric plus underscore only (a-zA-Z0-9_).

dbUserstring

Optional MySQL username. If this user already exists for this server in Webdock metadata, privileges are granted to the new database.

dbUserPasswordstring

Required when dbUser does not already exist for this server. Alphanumeric characters only (a-zA-Z0-9).

Response

application/json

MySQL database create request accepted

X-Callback-IDstringheader

CallbackID

createdstring

Database metadata creation datetime

dbUserobject | null

Single related database user as tracked by the existing Dashboard implementation

hoststring

Database host currently used for these databases

Example: localhost
idinteger

Database ID from Webdock metadata storage

namestring

Database name