Skip to main content

Upgrading MariaDB

You may have several MariaDB databases in your architecture. The central server has a database, each remote server has a database, and the MBI and MAP modules each have a dedicated database. Within your architecture, all databases must have the same version of MariaDB.

Upgrading process​

Upgrading from one major version of Centreon to another is a series of steps that you must perform in the correct order. These steps include upgrading MariaDB and upgrading Centreon (packages, web installation, configuration deployment), but the exact sequence depends on your current and target versions. Always follow the upgrade procedure for your version.

You can only upgrade Centreon from a supported OS.

Refer to the official MariaDB documentation for more information about this process: https://mariadb.com/kb/en/upgrading-between-major-mariadb-versions/

Version of Maria DB for each version of Centreon​

CentreonMariaDB
26.1011.8
25.1010.11
24.1010.11
24.0410.11
23.1010.5
23.0410.5

Knowing your version of MariaDB​

To find out which version of MariaDB is installed on your machine, enter the following command:

rpm -qa |grep -i mariadb

The results may look like this example:

MariaDB-client-10.5.8-1.el9.centos.x86_64
MariaDB-server-10.5.8-1.el9.centos.x86_64
MariaDB-common-10.5.8-1.el9.centos.x86_64
MariaDB-shared-10.5.8-1.el9.centos.x86_64
MariaDB-compat-10.5.8-1.el9.centos.x86_64

Upgrading between major MariaDB versions​

In this example, we will switch from version 10.11 to version 11.8. Adapt the procedure if you are upgrading from another version.

  1. Stop the MariaDB service:

    systemctl stop mariadb
  2. Execute the following command:

dnf module reset mariadb -y
  1. Install version 11.8:
dnf module enable -y mariadb:11.8
dnf install -y mariadb-server-11.8\* mariadb-11.8\*
  1. Start the MariaDB service:

    systemctl start mariadb
  2. Launch the MariaDB upgrade process:

    mariadb-upgrade

    If your database is password-protected, enter:

    mariadb-upgrade -u <database_admin_user> -p

    Example: if your database_admin_user is root, enter:

    mariadb-upgrade -u root -p

    Refer to the official documentation for more information or if errors occur during this last step.

  3. To enable MariaDB on startup, execute the following command:

    systemctl enable mariadb
  4. Before you finish upgrading your Centreon platform, execute the following command on the central server:

    systemctl restart php-fpm httpd
  5. Make sure MariaDB is running using systemctl status mariadb. If not, start it:

    systemctl start mariadb

Upgrading from 10.1 to a more recent version​

The innodb_additional_mem_pool_size parameter has been removed since MariaDB 10.2, so you should remove it from file /etc/my.cnf.d/centreon.cnf

#
# Custom MySQL/MariaDB server configuration for Centreon
#
[server]
innodb_file_per_table=1

open_files_limit = 32000

key_buffer_size = 256M
sort_buffer_size = 32M
join_buffer_size = 4M
thread_cache_size = 64
read_buffer_size = 512K
read_rnd_buffer_size = 256K
max_allowed_packet = 8M

# For 4 Go Ram
-#innodb_additional_mem_pool_size=512M
#innodb_buffer_pool_size=512M

# For 8 Go Ram
-#innodb_additional_mem_pool_size=1G
#innodb_buffer_pool_size=1G

Upgrading between minor versions of MariaDB​

Follow these steps to upgrade between minor versions of MariaDB (for example, to switch from version 10.3.2 to version 10.3.5):

  1. Update MariaDB:
dnf update mariadb-*
  1. Restart MariaDB:

    systemctl restart mariadb