[HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)
Posted: Tue Sep 11, 2018 6:02 pm
Step 1 Remove MariaDB 5.5/10.0/10.1/10.2
Before installing it is recommended to backup your databases, although it is not necessary if you followed this steps carefully.
First backup your current my.cnf config :
Now we need to remove current version of mariadb 5.5 installed on centos 7 :
For MariaDB 5.5 :
At this point MariaDB 5.5 will be removed completely but the databases are not removed don’t need to worry.
For MariaDB 10.0/10.1/10.2 :
At this point MariaDB 10.0/10.1/10.2 will be removed completely but the databases are not removed don’t need to worry.
Then Install MariaDB 10.3 :
Step 2 Installation/Updating from MariaDB 5.5/10.0/10.1/10.2 to MariaDB 10.3
Install/enable Official repo for mariadb 10.3:
Now edit/create the Repo file :
Ensure you don’t have any other MariaDB repo file in /etc/yum.repos.d if exists delete or backup the existing repo file :
then paste this lines and save it :
After that we’ll install Mariadb 10.3
Restore the my.cnf file :
Then enable mariadb to start on boot and start the service :
Final Step
After that we need to upgrade current databases by this command :
that’s it you’ve successfully upgraded MariaDB 5.5/10.0/10.1/10.2 to MariaDB 10.3.
You can confirm the version by running this command from terminal ssh:
Before installing it is recommended to backup your databases, although it is not necessary if you followed this steps carefully.
First backup your current my.cnf config :
Code: Select all
cp /etc/my.cnf /etc/my.cnf.bak
For MariaDB 5.5 :
Code: Select all
service mariadb stop / service mysql stop
yum remove mariadb mariadb-server
For MariaDB 10.0/10.1/10.2 :
Code: Select all
service mysql stop
yum remove MariaDB-server MariaDB-client
Then Install MariaDB 10.3 :
Step 2 Installation/Updating from MariaDB 5.5/10.0/10.1/10.2 to MariaDB 10.3
Install/enable Official repo for mariadb 10.3:
Code: Select all
yum install nano epel-release -y
Ensure you don’t have any other MariaDB repo file in /etc/yum.repos.d if exists delete or backup the existing repo file :
Code: Select all
mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak
nano /etc/yum.repos.d/mariadb.repo
Code: Select all
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Code: Select all
yum clean all
yum install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
yum update -y
Code: Select all
rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf
Code: Select all
systemctl enable mysql
service mysql start
After that we need to upgrade current databases by this command :
Code: Select all
mysql_upgrade
You can confirm the version by running this command from terminal ssh:
Code: Select all
mysql