Search code examples
mysqlmariadbcentos7cwp

How to Upgrade MariaDB 10.* to the new version 11.* in CWP Panel in Centos 7?


Modify repo file to the version you want to upgrade

Edit File: /etc/yum.repos.d/mariadb.repo

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.2/centos7-amd64

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1


Solution

  • Check which version of MariaDB is installed on your server

    MariaDB Repository Changes

    Modify repo file to the version you want to upgrade

    Edit File: /etc/yum.repos.d/mariadb.repo

    [mariadb]

    name = MariaDB

    baseurl = http://yum.mariadb.org/10.2/centos7-amd64

    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

    gpgcheck=1

    Modify 10.2 with the version you want to upgrade

    Example for upgrade to MariaDB 11.3.2

    [mariadb] name = MariaDB

    baseurl = https://mirror.mariadb.org/yum/11.3.2/centos7-amd64/

    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

    gpgcheck=1

    Stop and remove the old version of MariaDB (Databases will not be removed)

    service mysql stop

    service mariadb stop

    systemctl disable mariadb

    rpm --nodeps -ev MariaDB-server

    Install the new version of MariaDB

    yum clean all

    yum -y update "MariaDB-*"

    yum -y install MariaDB-server

    systemctl enable mariadb

    service mariadb start

    mysql_upgrade