Steps to upgrade MySQL to v8.0.40 for RHEL8, RHEL9 & Podman
Steps to upgrade MySQL to v8.0.40
Pre-requisite
Important Prerequisites to check before the upgrade:
MySQL version of QMetry Reports and QMetry Application should be 8.0.33.
Ensure that QMetry is not in use and there are no ongoing operations or traffic on QMetry.
Please ensure that docker is authenticated.
Upgrade Procedure for MySQL 8.0.40
Step 1: IMPORTANT: Backup Existing QMetry Database
Before proceeding, back up the existing “qmetry” database. Adjust the username, password, and backup file location as needed (default location is /opt).
Command Syntax:
podman exec qmetryapp_db sh -c 'exec mysqldump -uroot -p<password> --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_<date>.sqlExample:
podman exec qmetryapp_db sh -c 'exec mysqldump -uroot -pqmetry --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_2023-01-01.sql Step 2: Stop QMetry Services
Stop QMetry app and report containers by running the following commands:
systemctl stop qmetryapp
systemctl stop qmetryreportsStep 3: Extract and Run App Database Upgrade
Copy the
AppDBUpgrade.zipfile, received from QMetry Support, to the server where the QMetry database container are hosted.Navigate to the directory containing the file and execute:
// Unzip and Navigate to the AppDBUpgrade directory
unzip AppDBUpgrade.zip
cd AppDBUpgrade
// Grant execute permissions and run the upgrade script
chmod 777 dbupgrade.sh
./dbupgrade.shOnce the script starts executing, it will prompt you to enter the following parameters:
Options | Details | Default Value | Example |
|---|---|---|---|
Enter QMetry database password for root user | Enter QMetry Application Database Password for the root user. | - | QMetry@123 |
Step 4: Upgrade the Report Database:
Copy the
ReportDBUpgrade.zipfile, received from QMetry Support, to the server hosting both report and report-database container.Navigate to the directory containing the file and execute:
// Unzip and Navigate to the ReportDBUpgrade directory
unzip ReportDBUpgrade.zip
cd ReportDBUpgrade
// Grant execute permissions and run the upgrade script
chmod 777 dbupgrade.sh
./dbupgrade.shOnce the installation initiates, it will prompt you to enter the following parameters:
Options | Details | Default Value | Example |
|---|---|---|---|
Enter Report database password for root user | Enter password for QMetry Reports Database. | - | QMetryreports@!Nf0# |
Enter Report database schema | Enter Database schema name for QMetry Reports Database. | qtmanalytics | qtmanalytics |
Step 5: Restart QMetry Services
Start the QMetry application and report containers:
systemctl start qmetryapp
systemctl start qmetryreportsStep 6: Validate the Upgrade
Ensure data integrity by checking the QMetry app and report.
Step 7: Verify Report Synchronization
Confirm that the report synchronization functionality is working correctly.
These steps will help ensure a smooth upgrade from MySQL 8.x to MySQL 8.0.40.