2 Upgrading MySQL from Release 5.5.54 to Release 5.7.10

This chapter provides the instructions for upgrading MySQL from release 5.5.54 to 5.7.10.

Important:

Only Applicable to systems upgraded to version 4.1.0.0.0

Note:

Session Monitor version, 4.1.0.0.0 supports both MySQL versions, 5.5.54 and 5.7.10 If you have upgraded from a previous Session Monitor version, your system will be running MySQL 5.5.

Upgrading MySQL will not create any loss of data. But, all the services will be stopped during this upgrade. The upgrade time depends on the database size.

Note:

Before upgrading MySQL, configure proxies and repos as the yum command try to connect to the repos configured. Hence, it is recommend to configure the proxies and repos. Refer, Configuring Proxies and Repos.

To upgrade to MySQL 5.7.10 for the latest performance updates and improvements, perform the following steps in the maintenance window:

  1. Log in to the Session Monitor server console as the root user and run the following command to load the environment variables.

    source /opt/oracle/ocsm/ocsm_env.sh
    
  2. Run the following command to stop the Session monitor services:

    pld-systemctl stop
    
  3. From MOS, download the below patch from Patches and Updates section:

    Patch 22322140: MySQL Database 5.7.10 RPM for Oracle Linux / RHEL 7 x86 (64bit)

  4. Download the zip file and place it under /root or any directory on the system through WINSCP or FTP. For example, op22322140_570_Linux-x86-64.zip

  5. Run the following command to Unzip and extract all rpms:

    [root@ocsm ~]# unzip p22322140_570_Linux-x86-64.zip
    

    Following is a sample log for reference that may appear on the screen:

    Archive: p22322140_570_Linux-x86-64.zip
    extracting: mysql-commercial-libs-compat-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-devel-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-server-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-embedded-compat-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-common-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-embedded-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-test-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-embedded-devel-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-libs-5.7.10-1.1.el7.x86_64.rpm
    extracting: mysql-commercial-client-5.7.10-1.1.el7.x86_64.rpm
    extracting: README.txt
    
  6. Run the following command to install all the rpms extracted from the above zip file:

    yum install -y mysql-commercial*.rpm
    
  7. 7. Run the following command to complete all the MySQL table migrations from release 5.5 to the latest release 5.7.10

    mysql_upgrade
    

    This command may take some time to complete depending on the DB size.

  8. Once complete, run the following command to move MySQL configuration file, my.cnf:

    cp /opt/oracle/ocsm/etc/iptego/my-5.7.cnf
    /opt/oracle/ocsm/etc/iptego/my.cnf
    
  9. Run the following command to restart mysqld services to complete installation:

    systemctl restart mysqld.service
    
  10. Run the following command to start Session Monitor services:

    pld-systemctl start
    
  11. (Optional) To verify MySQL version installed on the machine, run the following command:

    mysql --version
    

Following is an example log:

[[root@localhost ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.10, for Linux (x86_64) using EditLine wrapper[root@localhost ~]#