Linux > Plesk

How to upgrade MariaDB 10.0 to 10.1 on CentOS 7

(1/1)

vichithrakumart:
1. Connect the server via ssh
2. Create a back up all the databases with the following command


--- Code: ---# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
--- End code ---

3. Create a databases directory in a separate folder


--- Code: ---# cp -a /var/lib/mysql/ /var/lib/mysql_backup
--- End code ---

4. Configure the repository by modifying the /etc/yum.repos.d/MariaDB.repo


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

5. Run yum update to update the MariaDB packages

6. Remove the old Mariadb package without dependencies


--- Code: ---# rpm -e --nodeps MariaDB-server-10.0.35-1.el7.centos.x86_64
--- End code ---

7. Install MariaDB-server package v.10.1


--- Code: ---# yum install MariaDB-server
--- End code ---

8. Start the MariaDB service


--- Code: ---#service mariadb start
--- End code ---

9. Upgrade MySQL databases


--- Code: ---# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
--- End code ---

10. Restart MySQL service


--- Code: ---# service mariadb restart
--- End code ---

11. Update the package version by running


--- Code: ---# plesk sbin packagemng -sdf
--- End code ---

12. Remove the mysql init script and reload the systemctl daemon


--- Code: ---# rm /etc/init.d/mysql
# systemctl daemon-reload
--- End code ---

13. Check the mariadb status


--- Code: ---#service mariadb status
--- End code ---




Navigation

[0] Message Index

Go to full version