Create MySQL database

This function creates a MySQL® database.

Important:

When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.

SecurityBasicAuth
Request
query Parameters
name
required
string

The new database's name.

Example: name=newdb
prefix-size
integer
Default: 16

The desired prefix size.

Enum: 8 16
Example: prefix-size=16
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Mysql/create_database
Request samples
uapi --output=jsonpretty \
  --user=username \
  Mysql \
  create_database \
  name='newdb'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "create_database",
  • "module": "Mysql",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}