Upgrade MariaDB 10.1 to 10.4

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.

wow thx!

Following the instructions at Installing MariaDB .deb Files - MariaDB Knowledge Base for Ubuntu I used the following commands:

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
apt-get install software-properties-common
add-apt-repository ‘deb [arch=amd64,arm64,ppc64el] Index of /mariadb/repo/10.2/ubuntu/ bionic main’
service mysql stop
cat /etc/cyberpanel/mysqlPassword
apt remove mariadb-server mariadb-client
apt update
apt install mariadb-server mariadb-client
service mysql start
mysql_upgrade -uroot -p

This worked except that despite specifying the 10.2 repo the process installed 10.4, maybe that was because I used ‘apt update’ before ‘apt install’.

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

dont have it :(( centos

I successfully completed the process with the following codes (for centos7 and ceyberpanel v2.1)

systemctl stop mariadb
yum -y remove MariaDB-server MariaDB-client galera
yum clean all

yum -y install wget
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
chmod +x mariadb_repo_setup
sudo ./mariadb_repo_setup
yum -y install MariaDB-server MariaDB-client galera

systemctl enable mariadb
systemctl start mariadb

I tried running ‘apt-key adv --fetch-keys …’ again and noticed the error ‘Invalid Argument’. I tried another key repo and it gave the same error. I’ve searched the web but not found any solution. This is on a Ubuntu DO droplet. Also tried:

Try this:

wget https://mariadb.org/mariadb_release_signing_key.asc
sudo apt-key add mariadb_release_signing_key.asc

Maria DB upgrade to 10.5 : https://mariadb.com/docs/deploy/upgrade-community-server-cs105-centos7/

I noticed that Centos 7 now installs with mysql 10.5 out of the box.

After the reinstall you get a page of errors like this:

Error: Transaction check error: Error: Transaction check error:file /usr/lib64/libmariadb.so.3 from install of - Pastebin.com

I didn’t copy my errors from the terminal but replace 10.3.11 with 10.4.x – different version of MariaDB but same errors.

Even if we stay with MariaDB 10.3, this makes me question how we’ll ever upgrade to 10.4 or 10.5 in the future. Also wondering why we’re using gf.repo when in @usmannasir wiki, he clearly is using the mariadb repo as he mentions it at the beginning of the

Type your comment> @themew said:

After the reinstall you get a page of errors like this:

Error: Transaction check error: Error: Transaction check error:file /usr/lib64/libmariadb.so.3 from install of - Pastebin.com

I didn’t copy my errors from the terminal but replace 10.3.11 with 10.4.x – different version of MariaDB but same errors.

Even if we stay with MariaDB 10.3, this makes me question how we’ll ever upgrade to 10.4 or 10.5 in the future. Also wondering why we’re using gf.repo when in @usmannasir wiki, he clearly is using the mariadb repo as he mentions it at the beginning of the

Its good that you are at 10.3, its the last version that is compatible with percona or mysql 8 incase you decide to migrate away in the future, if you upgrade to 10.4 it might make your database stuck with mariadb only.

Type your comment> @Numeriku said:

Its good that you are at 10.3, its the last version that is compatible with percona or mysql 8 incase you decide to migrate away in the future, if you upgrade to 10.4 it might make your database stuck with mariadb only.

No question 10.3 is very stable and doesn’t go eol until 2023, but Magento 2.4 requires 10.4 which is what we build with LiteSpeed and really want to continue using CyberPanel rather than another panel we’ve been using. Really don’t want this issue to be a dealbreaker for us since we really like the CyberPanel/LiteSpeed combination.

Our old servers use Plesk, so I decided to try upgrading a CentOS 8 server from MariaDB 10.3 (stock install) to 10.4. Four ssh commands and it’s upgraded. Still wondering why @usmannasir is using the gr.repo and not the MariaDB repos.

Also wondering if by using your work around (which is very complete btw), we’ll have issues upgrading CyberPanel to the next release with the gf.repo disabled and an os version of dovecot and postfix installed. Just trying to avoid downtime and headaches in the next few months :slight_smile:

Type your comment> @NickW said:

Following the instructions at Installing MariaDB .deb Files - MariaDB Knowledge Base for Ubuntu I used the following commands:

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
apt-get install software-properties-common
add-apt-repository ‘deb [arch=amd64,arm64,ppc64el] Index of /mariadb/repo/10.2/ubuntu/ bionic main’
service mysql stop
cat /etc/cyberpanel/mysqlPassword
apt remove mariadb-server mariadb-client
apt update
apt install mariadb-server mariadb-client
service mysql start
mysql_upgrade -uroot -p

This worked except that despite specifying the 10.2 repo the process installed 10.4, maybe that was because I used ‘apt update’ before ‘apt install’.

Tried but last step

@NickW
Version check failed. Got the following error when calling the ‘mysql’ command line client
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2 “No such file or directory”)
FATAL ERROR: Upgrade failed