Child pages
  • WHM API 1 Functions - start_background_mysql_upgrade
Skip to end of metadata
Go to start of metadata

Description

This function upgrades MySQL® or MariaDB® in the background.

Important:

In cPanel & WHM version 76 and later, when you disable the MySQL role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/start_background_mysql_upgrade?api.version=1&version=10.0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/start_background_mysql_upgrade?api.version=1&version=10.0
 Command Line
whmapi1 start_background_mysql_upgrade version=10.0


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "upgrade_id":"mysql_upgrade.20141108-172923"
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "start_background_mysql_upgrade"
  }
}
 Output (XML)
<result>
    <data>
        <upgrade_id>mysql_upgrade.20141108-172923</upgrade_id>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>start_background_mysql_upgrade</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ReturnTypeDescriptionPossible valuesExample
versionstring

Required

The desired MySQL or MariaDB version.

A valid version number.
10.0

Returns

ReturnTypeDescriptionPossible valuesExample
upgrade_idstring

The upgrade log's location.

A valid file path, relative to the /var/cpanel/logs/ directory.mysql_upgrade.20141108-172923