Upgrading MariaDB on Centos7

Hey. I’m already has mariadb installed but it was 5.x version. Today actual version 10.3.x. Lets upgrade!

yum remove mariadb-server mariadb-libs

Then nano /etc/yum.repos.d/mariadb.repo and make new repo

# MariaDB 10.3 CentOS repository list - created 2019-03-13 17:07 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

After lets install actual version of mariadb. If you not use php than not install that extensions (they were removed as dependency when we remove mariadb old version

yum install MariaDB-server MariaDB-client perl-DBD-MySQL php-snmp
systemctl start mariadb && systemctl enable mariadb

If you already has DB installed they will be saved. (But ofc make backups!) Lets update our DB.

mysql_upgrade -p

Thats all.


Leave a Reply

Your email address will not be published.