Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to upgrade MariaDB 10.0 to 10.1 on CentOS 7  (Read 3912 times)

0 Members and 1 Guest are viewing this topic.

vichithrakumart

  • Guest
How to upgrade MariaDB 10.0 to 10.1 on CentOS 7
« on: August 12, 2018, 01:13:35 pm »
1. Connect the server via ssh
2. Create a back up all the databases with the following command

Code: [Select]
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
3. Create a databases directory in a separate folder

Code: [Select]
# cp -a /var/lib/mysql/ /var/lib/mysql_backup
4. Configure the repository by modifying the /etc/yum.repos.d/MariaDB.repo

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

5. Run yum update to update the MariaDB packages

6. Remove the old Mariadb package without dependencies

Code: [Select]
# rpm -e --nodeps MariaDB-server-10.0.35-1.el7.centos.x86_64
7. Install MariaDB-server package v.10.1

Code: [Select]
# yum install MariaDB-server
8. Start the MariaDB service

Code: [Select]
#service mariadb start
9. Upgrade MySQL databases

Code: [Select]
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
10. Restart MySQL service

Code: [Select]
# service mariadb restart
11. Update the package version by running

Code: [Select]
# plesk sbin packagemng -sdf
12. Remove the mysql init script and reload the systemctl daemon

Code: [Select]
# rm /etc/init.d/mysql
# systemctl daemon-reload

13. Check the mariadb status

Code: [Select]
#service mariadb status