Note: These instructions seem to be out of date/incomplete. Before we update the official doc, it would be good to have extra input. Please see the comments below for more information and post any issues/changes that you discover.
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
- 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
- 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/
- 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
- 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
- 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/
- Enable and start MariaDB 10.5
systemctl enable mariadb
systemctl start mariadb