ISPManager 5 – CentOS 7 – how to upgrade mariaDB 5.5.60 to mariaDB 10.3.x / 10.4.x

0
19
MariaDB 10.4
MariaDB 10.4

ISPManager 5 – CentOS 7 – how to upgrade mariaDB 5.5.60 to mariaDB 10.3.x / 10.4.x

1) Add a repository for mariaDB 10.3.x or 10.4.x (you can generate a file here https://downloads.mariadb.org/mariadb/repositories/#mirror=limestone )

# vi /etc/yum.repos.d/mariadb.repo
# MariaDB 10.4 CentOS repository list - created 2019-09-09 08:36 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

2) We update the version to 10.4.x:

# systemctl stop mariadb nginx httpd
# yum update MariaDB-server MariaDB-client

3) If it does not start, look for errors, remove the old directives in my.cnf. There may also be an error like:

Can't create/write to file '/var/run/mariadb/mariadb.pid'
    to
pid-file =/var/lib/mysql/mysql.pid
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

Decision:

# mkdir -p /var/run/mariadb
# chown mysql:mysql /var/run/mariadb

or if the error is:

mysqld[27972]: 2020-05-07 23:41:39 0 [ERROR] mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 "No such file or directory")
mysqld[27972]: 2020-05-07 23:41:39 0 [ERROR] Can't start server: can't create PID file: No such file or directory

then

# mkdir -p /var/run/mysqld
# chown mysql:mysql /var/run/mysqld

4) We complete the upgrade with the commands:

# systemctl restart mariadb
# mysql_upgrade
# systemctl restart mariadb nginx httpd

LEAVE A REPLY

Please enter your comment!
Please enter your name here