CyberHosting

Upgrade MariaDB 10.1 to 10.4

edited January 24 in Database Server
Hi, Could someone please tell a short instruction on how to safely upgrade db from v10.1 to the latest v10.4 on CentOS 7.6. Preserving all the cyberpanel important configuration and relations to other modules.

Comments

  • edited January 28
    Copy your my.cnf to a backup

    cp /etc/my.cnf /etc/my.cnf-backup

    Remove the previous installations

    stop mariadb

    systemctl stop mariadb

    yum -y remove MariaDB-server MariaDB-client galera

    edit the current repo to use the 10.4 branch

    nano (or another editor)

    nano /etc/yum.repos.d/MariaDB.repo

    change the baseurl from 10.1 to 10.4

    save and exit

    now run the following commands

    yum clean all

    yum -y install MariaDB-server MariaDB-client galera

    Copy back the my.cnf file

    cp /etc/my.cnf.backup /etc/my.cnf

    Ensure mariadb is set to run from boot and by command line

    systemctl enable mariadb

    now ensure all databases are upgraded for this you will need to get the mysql password

    cat /etc/cyberpanel/mysqlPassword

    upgrade the databases with

    mysql_upgrade -uroot -p

    Now start mariadb

    systemctl start mariadb

    This is based on having ssh access and root if you dont try in the provided web terminal in Cyberpanel
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.

    https://www.cyberhosting.org
  • edited March 2
    @hennaboy said:

    > This is based on having ssh access and root if you dont try in the provided web terminal in Cyberpanel

    Hi. Is there a manual for ubuntu 18?
  • sudo apt-get install software-properties-common
    sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
    sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.mva-n.net/mariadb/repo/10.4/ubuntu bionic main'

    service mysql stop
    apt remove mariadb-server mariadb-client

    apt update
    apt install mariadb-server mariadb-client

    service mysql start

    mysql_upgrade -uroot -p (get the password as above)

    secure the install with

    mysql_secure_installation -uroot -p (password)

    You do not need to set a root pass as you already have one.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.

    https://www.cyberhosting.org
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!