Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
SELECT table_collation AS collation,GROUP_CONCAT(table_name) AS tables FROM information_schema.tables WHERE table_schema='DATABASE-NAME' GROUP BY collation;

Upgrading MariaDB

The recommended requirements for Blesta 5.0+ includes MySQL 5.7.7+ or MariaDB 10.2.2+. If you are running MariaDB < 10.2.2, you can upgrade to 10.2.x using this script.

First, backup all databases.

Code Block
languagebash
mysqldump -u root -p --all-databases > all_databases.sql


On CentOS 7.x with no root password set. use "mysql_upgrade -u root -pPASSWORD" if there is a password.

Code Block
languagebash
#!/bin/bash
# Upgrade MariaDB to 10.2

# ------- REPLACE MARIADB -------
# Set up MariaDB 10.2 repo
cat >/etc/yum.repos.d/MariaDB10.repo <<EOL
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOL

# Stop MariaDB
systemctl stop mariadb

# Remove old MariaDB
yum -y remove mariadb-server mariadb mariadb-libs
yum clean all

# Install MariaDB 10.2
yum -y install MariaDB-server MariaDB-client
# UNCOMMENT IF YOUR PHP MYSQL PACKAGE IS php-mysql
#yum -y install php-mysql
systemctl enable mariadb
systemctl start mariadb
mysql_upgrade

# Re-install postfix!
# UNCOMMENT IF RUNNING VIRTUALMIN OR POSTFIX
#yum install postfix -y
#systemctl enable postfix
#systemctl start postfix