Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
[HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)
  • Quote

Post by xorro » 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 :

Code: Select all

cp /etc/my.cnf /etc/my.cnf.bak
Now we need to remove current version of mariadb 5.5 installed on centos 7 :

For MariaDB 5.5 :

Code: Select all

service mariadb stop  /  service mysql stop
yum remove mariadb mariadb-server
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 :

Code: Select all

service mysql stop 
yum remove MariaDB-server MariaDB-client
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:

Code: Select all

yum install nano epel-release -y
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 :

Code: Select all

mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak
nano /etc/yum.repos.d/mariadb.repo
then paste this lines and save it :

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
After that we’ll install Mariadb 10.3

Code: Select all

yum clean all
yum install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
yum update -y
Restore the my.cnf file :

Code: Select all

rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf
Then enable mariadb to start on boot and start the service :

Code: Select all

systemctl enable mysql
service mysql start
Final Step

After that we need to upgrade current databases by this command :

Code: Select all

mysql_upgrade
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:

Code: Select all

mysql
Top

liamgibbins
Posts: 28
Joined: Thu Jan 04, 2018 5:33 pm

Os: CentOS 6x
Web: apache + nginx
Re: [HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)
  • Quote

Post by liamgibbins » Fri May 10, 2019 7:57 pm

I get "Failed to execute operation: Too many levels of symbolic links" on a fresh install on centos 7 when running the "systemctl enable mysql" command.

Is there any ways around this?
Top

lex0013
Posts: 36
Joined: Tue Oct 28, 2014 9:26 am
Contact:
Contact lex0013
Website Facebook

Os: CentOS 6x
Web: apache + nginx
Re: [HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)
  • Quote

Post by lex0013 » Wed May 15, 2019 5:31 pm

Code: Select all

systemctl enable mariadb

Code: Select all

systemctl start mariadb
Top

vihatsoft
Posts: 4
Joined: Thu Aug 09, 2018 4:57 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: [HowTo] Update/Upgrade to MariaDB 10.3 on VestaCP (CenOS 7)
  • Quote

Post by vihatsoft » Sun Jun 07, 2020 9:29 am

Missing two steps for pid file:

1. Create file if not exist /usr/lib/tmpfiles.d/mariadb.conf as root user with following content.

Code: Select all

d /var/run/mariadb 0755 mysql mysql -
2. Add pid-file location in /etc/my.cnf like bellow

Code: Select all

[mysqld]
pid-file=/var/run/mariadb/mariadb.pid
datadir=/var/lib/mysql
3. Reboot server and check mariadb.pid exist in /var/run/mariadb then Done.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password