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.

Authorizations:
query Parameters
name
required
string

The new database's name.

Example: name=newdb

Responses

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

Request samples

uapi --user=username Mysql create_database name='newdb'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "create_database",
  • "module": "Mysql",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}