How to update/upgrade to MariaDB7 for VestaCP/CWP/CentOS 10.10.2?

In this tutorial will guide you how toCentos 7, upgrade/install MariaDB to the latest Mariadb10.10.2 version.

  • This tutorial also applies to CWP andVestaCPor any other compatible VPS server control panel.

How to update/upgrade to MariaDB7 for VestaCP/CWP/CentOS 10.10.2?

MariaDB 10.10.2 is now very stable and many features have been added and improved in this release.

  • You canHereCheck the list of all changes.

we have usedWordPress, Joomla, xenforo, IPS Forum and some dependencies that depend onMySQL The DB's PHP script checks for MariaDB 10.10.2, so it is safe to upgrade to this version.

What is MariaDB?

A short description about MariaDB:

  • MariaDB is designed toMySQLdirect substitute.
  • With more features: new storage engine, fewer bugs and better performance.
  • MariaDB was developed by many of MySQL's original developers, who now work for the MariaDB Foundation and MariaDB Corporation, as well as many in the community.

To upgrade, follow these simple steps to upgrade to the latest version.

Step 1: Delete MariaDB old version

  • Delete the old version of MariaDB, such as: 5.5 / 10.0 / 10.1 / 10.2 / 10.3

Before installing, it is recommended that you back up firstMySQL database.

First, backup your current my.cnf configuration▼

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

For MariaDB 5.5 ▼

service mariadb stop / service mysql stop
rpm -e --nodeps galera
yum remove mariadb mariadb-server
  • At this point MariaDB 5.5 will be completely removed, but the database will not be removed, don't worry.

For versions above MariaDB 10: 10.0 / 10.1 / 10.2 / 10.3 ▼

service mysql stop 
rpm -e --nodeps galera
yum remove MariaDB-server MariaDB-client
  • At this point, MariaDB 10.0/10.1/10.2/10.3 will be completely deleted, but the database will not be deleted, don't worry.

Step 2: Install MariaDB 10.10.2

  • From MariaDB 5.5/10.0/10.1/10.2/10.3 versions, install/update to MariaDB 10.10.2.

Install Mariadb 10.10.2 official repo ▼

yum install nano epel-release -y

Now edit/create the Repo file/etc/yum.repos.d

If there are delete or backup existing repo files, make sure you don't have any other MariaDB repository files ▼

mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak
nano /etc/yum.repos.d/mariadb.repo

Then paste the following, and save▼

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

After that we will install Mariadb 10.10.2 ▼

yum clean all
yum install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
yum update -y

Recover my.cnf file ▼

rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf

Then, activate Mariadb to boot, and start the service:

systemctl enable mariadb
service mysql start

Step 3: Upgrade the current database

After installation, we need to upgrade the current database by the following command ▼

mysql_upgrade
  • If nothing else, you have successfully upgraded MariaDB 5.5 / 10.0 / 10.1 / 10.2 / 10.3 to the latest version of MariaDB 10.10.2.

If you are typing the command mysql_upgrade When upgrading the database, the following error message appears ▼

[root@ ~]# mysql_upgrade
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed

Please use the followingmysql_upgrade command to fix ▼

mysql_upgrade -u root --datadir=/var/lib/mysql/ --basedir=/ --password=123456
  • Please change the above "123456" to your MySQL or Mariadb database root password.

Finally, you can confirm the MySQL or Mariadb database version by running this command from the terminal SSH ▼

mysql -V

Please Note

If your MariaDB database has a similar error message▼

警告:数据库错误 Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 50560, now running 100406. Please use mysql_upgrade to fix this error 查询 SHOW FUNCTION STATUS

For solutions to MariaDB database errors, please click the link below to view▼

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How to update/upgrade to MariaDB7 in VestaCP/CWP/CentOS 10.10.2? , to help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1100.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top