Return MySQL version

This function retrieves the server's version of MySQL® or MariaDB®.

Important:

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

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  current_mysql_version

Response samples

Content type
application/json
{
  • "data": {
    • "server": "mysql",
    • "version": "8.0"
    },
  • "metadata": {
    • "command": "current_mysql_version",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}