The jtel Portal System is moving to use MySQL 8.x instead of the older MySQL 5.6.
Currently, the latest release of the portal 3.15 supports both versions of MySQL, however this is only an interim measure, and this will change in a coming release soon such that MySQL 8.x is required.
This procedure describes how to update the system to MySQL 8.x.
Caution
This is a non trivial operation. Only proceed if you have adequate rollback mechanisms in place, such as snapshots of your virtual machines and a backup of the database.
ALWAYS UPDATE SLAVES FIRST - COMPLETELY TO 8.x BEFORE UPDATING THE MASTER.
Pre-Requisites
- The jtel Portal must be updated to the latest version, currently 3.15
- The operating system must be updated to include all of the latest patches using yum -y update
yum-utils must be installed using yum -y install yum-utils
Introduction
This is a multi-state operation, since the MySQL system does not support missing out updates to versions - to move from 5.6 to 8.0 it is required to first update to 5.7.
Caution
Do not proceed unless the Pre-Requisites are done. The procedure WILL NOT WORK with an earlier version of the jtel Portal installed.
Phase 1 - Update MySQL to 5.7
Remove Old yum repository, and install new yum repository
First of all, remove the old MySQL yum repository.
yum remove mysql-community-release.noarch
Next, install the new MySQL yum repository, using the command relevant to the OS version being used.
You can determine the OS being used, with the following command:
cat /etc/centos-release
For CentOS 7:
yum -y localinstall https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
For CentOS 6:
yum -y localinstall https://dev.mysql.com/get/mysql80-community-release-el6-3.noarch.rpm
Update MySQL Server to 5.7
This involves clearing the version-lock table, and enabling the 5.7 update path.
Note, the yum command is issued without the -y option. You should check what the system is about to do before confirming this step.
# Clear versionlock table yum versionlock clear # Enable 5.7 yum-config-manager --disable mysql56-community yum-config-manager --enable mysql57-community yum-config-manager --disable mysql80-community # Update yum update
Run mysql_upgrade
Either change the password in the following command, or simply use the -p option without specifying a password, and entering it at the prompt.
mysql_upgrade -u root -p<password>
Check the output from this phase before proceeding. If the mysql Server does not start or this procedure is showing non-recoverable error messages, then the procedure has gone wrong, and you must rollback here.
Note
The jtel Portal is NOT compatible with MySQL 5.7 - you must continue the upgrade path to 8.x at this point.
Phase 2 - Update MySQL to 8.0
Caution
Proceeding after this point without Version 3.15 or later of the jtel Portal installed, will break the database, and a rollback will be necessary.
Enable 8.0 repoitories and update the server
Note, the yum command is issued without the -y option. You should check what the system is about to do before confirming this step.
# Enable 8.x yum-config-manager --disable mysql56-community yum-config-manager --disable mysql57-community yum-config-manager --enable mysql80-community # Update to 8.x yum update
mysql_upgrade
mysql_upgrade is run automatically by all current 8.x versions of MySQL Server.
The output of mysql_upgrade can be found in /var/log/mysqld.log
Check this file for errors.
Phase 3 - Configure Other Components
Update the JBOSS Server
The JBOSS server requires a new connector to attach to MySQL 8.x.
This can be copied to the JBOSS server instance, using the following command (run for example from /home/jtel/shared/JTELCarrierPortal/Update), as the jtel user:
./update_jboss.sh
Reconfigure 8-Server ODBC Connections
The Rollback string for MySQL Versions 8.x (in fact MySQL 5.7) and higher has changed, and will need to be reconfigured in 8-Server.
The new rollback string is:
DO RELEASE_ALL_LOCKS(); ROLLBACK;
8-Server should be restarted after making this change: