---
title: "Return MySQL or MariaDB upgrade status"
method: GET
path: "/background_mysql_upgrade_status"
tags: ["Databases", "Manage MySQL Server"]
---

# Return MySQL or MariaDB upgrade status

`GET /background_mysql_upgrade_status`

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

**Important:**

  When you disable the [MySQL/MariaDB](https://go.cpanel.net/serverroles) role and remote MySQL is **not** already configured, the system **disables** this function.

## Query parameters

- `upgrade_id` string, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `error` integer — An error code. * `0` — Successful upgrade. * `-1` — Child process died from a signal. * `4` — MySQL upgrade failed error code.
    - `error_log` string — The upgrade's error log file. **Note:** You can review MySQL upgrade error logs in the following location, where $TIME represents the time in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) format: `/var/cpanel/logs/mysql_upgrade.$TIME/unattended_background_upgrade.error`.
    - `log` string — The upgrade's log file.
    - `state` 'success' | 'failed' | 'in progress' — The upgrade's state. * success * failed * in progress
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
