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.
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 COMPLETELY TO 8.x FIRST - BEFORE UPDATING THE MASTER. WHEN UPDATING MASTER-MASTER CONFIGURATIONS, STOP THE OTHER MASTER DURING THE UPDATE PROCESS with service mysqld stop. MAKE SURE THAT BOTH MASTERS ARE 8.x BEFORE RESTARTING BOTH AT THE SAME TIME. |
yum-utils must be installed using yum -y install yum-utils
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.
Do not proceed unless the Pre-Requisites are done. The procedure WILL NOT WORK with an earlier version of the jtel Portal installed. |
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 |
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 |
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.
The jtel Portal is NOT compatible with MySQL 5.7 - you must continue the upgrade path to 8.x at this point. |
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. |
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 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. |
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 |
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: