Jump to content

Upgrade MariaDB 10.11 In CWP Centos 7 Centos 8 stream AlmaLinux 7/8 RockyLinux 7/8

Featured Replies

Posted
comment_25

MariaDB 10.11 is now very stable and many features has been added and improved in this version you can check all lists of changes here

I’ve checked MariaDB 10.11 with WordPress, Joomla, xenforo, IPS forum and some more PHP scripts which depends on MySQL DB are working fine with this version hence it is safe to upgrade to this version.

Short description about MariaDB :

MariaDB is designed as a drop-in replacement of MySQL with more features, new storage engines, fewer bugs, and better performance. MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Foundation and the MariaDB Corporation, and by many people in the community.

Step 1 :
Remove MariaDB 10.0/10.1/10.2/10.3/10.x
To upgrade Mariadb 10.11 in Centos 7/CWP do this :
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 :

cp /etc/my.cnf /etc/my.cnf.bak


Remove MariaDB 10.0/10.1/10.2/10.3/10.xx :

systemctl stop mariadb mysql mysqld
systemctl disable mariadb
rpm --nodeps -ev MariaDB-server


At this point MariaDB 10.0/10.1/10.2/10.3.10.xx will be removed completely but the databases are not removed don’t need to worry.

Then Install MariaDB 10.11 :

Step 2 :
Installation/Updating from MariaDB 10.0/10.1/10.2/10.3/10.xx to MariaDB 10.11


To upgrade Mariadb to 10.11 in Centos 7 CWP do this :
Install/enable Official repo for mariadb 10.11:

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 :

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 :
to install Mariadb 10.11

[mariadb]
name = MariaDB
baseurl = https://rpm.mariadb.org/10.11/centos/$releasever/$basearch
module_hotfixes = 1
gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck = 1


After that we’ll install Mariadb 10.11 :

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


To upgrade Mariadb 10.11 in Centos 8 stream/almalinux 8/rockylinux 8 do this :
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 :

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


add this lines and save it :

[mariadb]
name = MariaDB
baseurl = https://rpm.mariadb.org/10.11/centos/$releasever/$basearch
module_hotfixes = 1
gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck = 1


After that update Mariadb 10.11 :

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


Step 3 :
Restore the my.cnf file :

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


Then enable mariadb to start on boot and start the service :

systemctl enable mariadb
service mariadb start


Step 4 :
After Installation we need to upgrade current databases by this command :

mysql_upgrade --force


that’s it you’ve successfully upgraded MariaDB 10.0/10.1/10.2/10.3/10.xx to MariaDB 10.11.

You can confirm the version by running this command from terminal ssh:

mysql -V

 

  • 2 weeks later...
  • 1 month later...
comment_371

Every thing seems to be running OK following the above in AlmaLinux 8.9

There is one thing: mysql_upgrade --force works but it produces the following error ---> "mysql_upgrade: unknown variable 'query_cache_type=1'"

In CWP dashboard using the restart MySQL Database Server button works, and the error is suppressed in the success dialogue. 

Thanks for sharing this with us Sandeep! 

  • 3 months later...
comment_899

Tried this on one of my servers and the upgrade went smoothly but monit monitoring doesn't seem to pick it up.

I always get :

Process - mysql Execution failed | Does not exist

reloading / restarting / unmonitor and remonitor didn't help.

Maybe we need to update the contents of File: /etc/monit.d/cwp.mysql  somehow ?

 

  • Author
comment_900

add this line to /etc/my.cnf 

[mysqld]
pid-file = /var/lib/mysql/mariadb.pid

restart mariadb service

and edit monit config file

nano /etc/monit.d/cwp.mysql

replace with below config

check process mariadb with pidfile /var/lib/mysql/mariadb.pid
  group database
  start program = "/usr/bin/systemctl start mariadb"
  stop  program = "/usr/bin/systemctl stop mariadb"
  restart program  = "/usr/bin/systemctl restart mariadb"
  if failed port 3306 protocol mysql then restart
  if 3 restarts within 5 cycles then timeout
  alert root@localhost only on {timeout}

then restart monit service 

comment_902
35 minutes ago, Sandeep B. said:

add this line to /etc/my.cnf 

[mysqld]
pid-file = /var/lib/mysql/mariadb.pid

restart mariadb service

and edit monit config file

nano /etc/monit.d/cwp.mysql

replace with below config

check process mariadb with pidfile /var/lib/mysql/mariadb.pid
  group database
  start program = "/usr/bin/systemctl start mariadb"
  stop  program = "/usr/bin/systemctl stop mariadb"
  restart program  = "/usr/bin/systemctl restart mariadb"
  if failed port 3306 protocol mysql then restart
  if 3 restarts within 5 cycles then timeout
  depends on mariadb_bin
  depends on mariadb_init
  alert root@localhost only on {timeout}

then restart monit service 

Now monit won't start at all.

running sudo monit -t

get this
 

Depending service 'mariadb_init' is not defined in the control file

 

  • 1 month later...
comment_983

Hello,

Why do I get this error when I want to update the galera? 

spacer.png

Error: 
 Problem: cannot install the best update candidate for package galera-4-26.4.16-1.el8.x86_64
  - nothing provides libboost_program_options-mt.so.1.53.0()(64bit) needed by galera-4-26.4.18-1.el7.centos.x86_64 from mariadb
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

 

  • 5 months later...
comment_1138

After upgrading the CPU get high and all the websites not working , and the server is too slow, i tried to reboot but the result is the same.

 

  • CPU Model: AMD Ryzen 5 3600 6-Core Processor
  • CPU Details: 12 Core (2200 MHz)
  • Distro Name: CentOS Linux release 7.9.2009 (Core)
  • Kernel Version: 3.10.0-1160.119.1.el7.x86_64
  • Platform: x86_64 Dedicated

Edited by Leebrimlow

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now