fbpx

Upgrading to MariaDB 10.5 manually

You are here:
  • KB Home
  • Upgrading to MariaDB 10.5 manually
< Back

MariaDB 10.1 is depreciating in the upcoming weeks so Cyberpanel 2.0.3 will come with MariDB 10.5. New installation will be automatically based on that version and older version will be upgraded.

If you don’t see the latest version after upgrade or mariadb doesn’t work for you any more, here are the steps to fix that

1. Make sure that the repo has been updated

cat /etc/yum.repos.d/mariadb.repo

If the output has 10.5 in the string you are okay to continue, if not, please edit the file and update it to 10.5

2. Backup MariaDB’s configuration files

Run the following commands to backup the current configuration

cp /etc/my.cnf /etc/my.cnf.bak 
mkdir /etc/cnfbackup 
cp -R /etc/my.cnf.d/ /etc/cnfbackup/

3. Remove the current version

Run these commands to remove MariaDB
For Centos

yum remove MariaDB-server MariaDB-client galera MariaDB-devel MariaDB-shared -y

For Ubuntu

apt remove MariaDB-server MariaDB-client galera MariaDB-devel MariaDB-shared -y

 

4. Install MariaDB 10.5
For Centos

yum --enablerepo=mariadb -y install MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared -y

For Ubuntu

apt install MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared -y

 

5. Restore the backed up files

cp -f /etc/my.cnf.bak /etc/my.cnf 
rm -rf /etc/my.cnf.d/ 
mv /etc/cnfbackup/my.cnf.d /etc/

5. Enable and start MariaDB 10.5

systemctl enable mariadb
systemctl start mariadb

 

 

 

 

Author's page
Muttahir Syed

Muttahir is a passionate developer and a DevOps engineer who loves to help others by documenting tech. At CyberPanel, he works as DevOps support and documents new changes

Leave a Reply