Return MySQL or MariaDB upgrade status

This function retrieves the status of a background MySQL® or MariaDB® upgrade.

Important:

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

SecurityBasicAuth
Request
query Parameters
upgrade_id
required
string

The logfile's name.

Note:

 Log files exist in the /var/cpanel/logs/ directory.

Example: upgrade_id=mysql_upgrade.20141108-172923
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/background_mysql_upgrade_status
Request samples
whmapi1 --output=jsonpretty \
  background_mysql_upgrade_status \
  upgrade_id='mysql_upgrade.20141108-172923'
Response samples
application/json
{
  • "data": {
    • "error": 0,
    • "error_log": "Starting The system failed to update MYSQL,\\n------------------------------------\\n",
    • "log": "Starting process with log file at /var/cpanel/logs/mysql_upgrade.20141108-172923/unattended_background_upgrade.log\nBeginning MariaDB 10.0 upgrade...\nObtained version information from system.\nEnsuring the MariaDB100 repository is available and working.\ncheckyum version 22.3\nEnsuring that the package MariaDB-client with version matching 10.0 is available.\nEnsuring that the package MariaDB-common with version matching 10.0 is available.\nEnsuring that the package MariaDB-devel with version matching 10.0 is available.\nEnsuring that the package MariaDB-server with version matching 10.0 is available.\nEnsuring that the package MariaDB-shared with version matching 10.0 is available.\nEnsuring that the package coreutils is available.\nEnsuring that the package grep is available.\nEnsuring that the package perl-DBI is available.\n your MariaDB server version for the right syntax to use near ''.`netcopya0I5KfqYTfHqJr` FOR UPGRADE'' at line 1 when executing ''CHECK TABLE ... FOR UPGRADE''\nFATAL ERROR: Upgrade failed\nDone building configuration.\nHooks system enabled.\nChecking for and running RPM::Versions ''post'' hooks for any RPMs about to be installed\nAll required ''post'' hooks have been run\nRunning: /usr/local/cpanel/scripts/check_cpanel_pkgs --targets=MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MariaDB100,MariaDB101 --fix\nRestarting mysql service.\nWaiting for mysql to restart waiting for mysql to initialize finished.\n\u001b[1;32mMariaDB upgrade completed successfully\u001b[0m\n------------------------------------\n",
    • "state": "success"
    },
  • "metadata": {
    • "command": "background_mysql_upgrade_status",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}