Steps to Upgrade MySQL to v8.0.40
Steps to upgrade MySQL to v8.0.40
Pre-requisites
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 in case of Online installation.
Steps:
→ In case of Offline Installation
Follow the steps to download and restore the QMetry Database image. After the image is successfully restored, you can then move forward with the next steps.
Step 1: IMPORTANT: Backup Your Existing QMetry Database
Before proceeding, back up existing “qmetry” database. Adjust the username, password, and backup file location as needed (default location is /opt).
Command Syntax:
docker 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:
docker 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.sqlStep 2: Stop QMetry Services
Stop QMetry app and report containers.
docker stop qmetry_app_1
docker stop qmetry-reportsStep 3. Extract AppDBUpgrade.zip.
Copy the AppDBUpgrade.zip file received from QMetry Support to the server hosting the QMetry database container. Navigate to the directory containing the file and execute the following command:
// 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.zip file received from QMetry Support to the server hosting both report and report-database container. Navigate to the directory containing the file and execute the following command:
// 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 app and report containers.
docker start qmetry_app_1
docker start qmetry-reportsStep 6: Validate the Upgrade:
Check the QMetry app and report to ensure data integrity.
Step 7: Check Report sync functionality working or not.
These steps will help ensure a smooth upgrade from MySQL 8.x to MySQL 8.0.40.