Author Topic: Update MariaDB >= 10.2  (Read 382 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Update MariaDB >= 10.2
« on: September 27, 2018, 04:07:06 PM »
I wanna update MariaDB to >= 10.2 or change with MySql >= 5.7.19  (I need support json columns)
Is it possible from Admin panel?
If not will be good if show me some guide for that
Thank You

Offline
*
Re: Update MariaDB >= 10.2
« Reply #1 on: October 01, 2018, 09:04:52 AM »
+1 for me too

Offline
**
Re: Update MariaDB >= 10.2
« Reply #2 on: October 07, 2018, 08:36:39 PM »
CentOS have not that version for MariaDB.
'yum update' install the latest version, that is 10.1.36, for CentOS 7.
(what is your CentOS version?)

But nothing can stop you from install it from sources.
Or install rpms from RHEL7, that possibly will work too.
At yout risk.

RHEL7 have the '10.2.8-5.el7.x86_64.rpm' version available.

Regards,
Netino

Offline
****
Re: Update MariaDB >= 10.2
« Reply #3 on: October 08, 2018, 03:49:58 AM »
CentOS have not that version for MariaDB.
'yum update' install the latest version, that is 10.1.36, for CentOS 7.
(what is your CentOS version?)

But nothing can stop you from install it from sources.
Or install rpms from RHEL7, that possibly will work too.
At yout risk.

RHEL7 have the '10.2.8-5.el7.x86_64.rpm' version available.

Regards,
Netino

First of all MariaDB has it's own repository and is not provided by base CentOS repository.

Quote
yum whatprovides mariadb
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iitm.ac.in
 * epel: mirror1.ku.ac.th
 * extras: ftp.iitm.ac.in
 * updates: ftp.iitm.ac.in
MariaDB-client-10.1.36-1.el7.centos.x86_64 : MariaDB: a very fast and robust SQL database server
Repo        : mariadb
Matched from:
Provides    : mariadb = 1:10.1.36-1.el7.centos


Below is its repository location.

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

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

This will show you what version of MariaDB is installed. So in our case its 10.1

Quote
rpm -qa | grep -i '^mariadb-'

MariaDB-shared-10.1.36-1.el7.centos.x86_64
MariaDB-compat-10.1.36-1.el7.centos.x86_64
MariaDB-common-10.1.36-1.el7.centos.x86_64
MariaDB-server-10.1.36-1.el7.centos.x86_64
MariaDB-client-10.1.36-1.el7.centos.x86_64

Now if I want to upgrade this I will modify mariadb.repo file and change 10.1 to 10.2

Quote
vi /etc/yum.repos.d/mariadb.repo

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

First I will make full backup of my database if something goes wrong

Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
Simply go ahead and remove these packages

Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Now install the new latest packages again for version 10.2.

Code: [Select]
yum install MariaDB-server MariaDB-client -y
You can change 10.1 to 10.3 MariaDB repository "/etc/yum.repos.d/mariadb.repo" in if you wish to use that version.

Verify the packages again

Quote
[root@localhost ~]# rpm -qa | grep -i '^mariadb-'
MariaDB-shared-10.2.18-1.el7.centos.x86_64
MariaDB-server-10.2.18-1.el7.centos.x86_64
MariaDB-compat-10.2.18-1.el7.centos.x86_64
MariaDB-common-10.2.18-1.el7.centos.x86_64
MariaDB-client-10.2.18-1.el7.centos.x86_64

Start Mariadb

Code: [Select]
systemctl start mariadb
Upgrade MySQL database for compatibility

Code: [Select]
mysql_upgrade