---
title: "Upgrade to MySQL 8.4"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/prerequisites/compatibility-matrix/upgrade-mysql-8-4/index.html"
---
## Prerequisites

Before performing the upgrade, ensure the following prerequisites are met:

- Your Opsview version is fully upgraded to 6.11.7 or newer. Older versions do not support MySQL 8.4 as the default database.
- Your database is running MySQL. Switching between database vendors (for example, from MariaDB to MySQL or vice versa) is not supported for existing local, remote, or RDS databases.
- Your operating system is compatible with MySQL 8.4. For more information, see [Supported databases](https://docs.itrsgroup.com/docs/opsview/6.11.7/prerequisites/compatibility-matrix/supported-databases/index.html).

## Back up Opsview databases and configuration


**Warning**


This step is crucial to prevent data loss in your Opsview system.



It is important to back up your databases so you can recover your data and restore operations in case of issues during the upgrade process, such as system crashes or hardware failures.

To backup your Opsview data and system, refer to [Back up your Opsview data and system](https://docs.itrsgroup.com/docs/opsview/6.11.7/upgrade-notes/overview/index.html#back-up-your-opsview-data-and-system) for instructions on backing up all databases on the server. If you are using a remote database server, perform the backup on your database host. Otherwise, perform the backup on the orchestrator.

## Upgrade to MySQL 8.4

On your orchestrator, do the following steps:

1. Add the following configuration to the `user_vars.yml` file.

  ```
  opsview_database_package_vendor: 'mysql'
  opsview_database_package_version: '8.4'
  ```

2. Run the `check-deploy` and `setup-everything` playbooks to upgrade the databases to MySQL 8.4.

  ```
  cd /opt/opsview/deploy
  ./bin/opsview-deploy lib/playbooks/check-deploy.yml
  ./bin/opsview-deploy lib/playbooks/setup-everything.yml
  ```

## Run setup-monitoring

1. On your orchestrator, run the `setup-monitoring` playbook.

  ```
  cd /opt/opsview/deploy
  ./bin/opsview-deploy lib/playbooks/setup-monitoring.yml
  ```

2. After completing the step, [Apply Changes](https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/apply-changes/index.html) to submit your database modifications.

## RDS 

MySQL 8.4 has a parameter, called `restrict_fk_on_non_standard_key`, which is set to `ON` by default. Opsview requires this parameter to be set to `OFF`. 

Before running the playbooks to install or upgrade Opsview, ensure that the `restrict_fk_on_non_standard_key` parameter is set to `OFF` in your MySQL 8.4 DB instance on AWS RDS.

### Upgrading Opsview with MySQL 8.4

Before running the playbooks to upgrade Opsview, make sure to set the `restrict_fk_on_non_standard_key` parameter to `OFF` in AWS RDS for your MySQL 8.4 DB instance. 

1. Stop Opsview processes.

  ```
  # /opt/opsview/watchdog/bin/opsview-monit stop all
  ```
2. Upgrade your MySQL RDS DB instance to 8.4. 
  Refer to the [RDS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MySQL.Major.html) for instructions on upgrading your MySQL instance to 8.4.
 
3. Set the MySQL parameter `restrict_fk_on_non_standard_key` to `OFF`. 
  See the RDS documentation for guidance on configuring this parameter on your DB instance.

4. Start Opsview processes.

  ```
  # /opt/opsview/watchdog/bin/opsview-monit start all
  ```
   
5. Upgrade Opsview.

## Troubleshooting

To help resolve any issues you may encounter during the upgrade, refer to the [Database issues](https://docs.itrsgroup.com/docs/opsview/6.11.7/troubleshooting/database-issues/index.html) troubleshooting documentation.


