Steps to upgrade the MariaDB Version in AWS RDS Cloud

Pre-Upgrade Checklist

1. Identify the Current Version

Run the following command to check your existing MariaDB version:

Select Version()

2. AWS CLI command to identify the valid upgrade targets for a DB instance:

-- For Linux:
aws rds describe-db-engine-versions \
  --engine mariadb \
  --engine-version version_number \
  --query "DBEngineVersions[*].ValidUpgradeTarget[*].{EngineVersion:EngineVersion}" --output text

-- For Windows:
aws rds describe-db-engine-versions ^
  --engine mariadb ^
  --engine-version version_number ^
  --query "DBEngineVersions[*].ValidUpgradeTarget[*].{EngineVersion:EngineVersion}" --output text

Example: My Version is 10.5.27 I want to check direct upgrade 10.11.10
aws rds describe-db-engine-versions ^
  --engine mariadb ^
  --engine-version 10.5.27 ^
  --query "DBEngineVersions[*].ValidUpgradeTarget[*].{EngineVersion:EngineVersion}" --output text

Output: It will show you direct auto-upgrade direct from 10.5.27 version.

----------------------------------
|    DescribeDBEngineVersions    |
+--------------+-----------------+
|  AutoUpgrade |  EngineVersion  |
+--------------+-----------------+
|  False       |  10.5.27        |
|  TRUE        |  10.6.13        |
|  True        |  10.11.10       |
+--------------+-----------------+

UPGRADE PROCESS

3. Stop the application that is using the MariaDB Server.

4. In the RDS Service, create a manual snapshot of the database before upgrading.

5. In the RDS Service, select the database you want to upgrade.

6. Note: Check if the parameter group is set to default for existing database. If not, change it to the default parameter group first, then reboot the database to apply the changes. Then repeat 4 and 5 steps

7. Click Modify to open the modification settings.

8. Under DB engine version, select the new version you want to upgrade to.

9. Click Continue and review the summary of changes.

10. Decide when you want the upgrade to happen:

–> To apply the changes immediately, choose Apply immediately (Note: This may cause a temporary downtime).

–> To schedule it for the next maintenance window, choose Apply during the next scheduled maintenance window.

11. On the confirmation page, review your changes:

–> If you change your mind, click Cancel to discard the changes.

–> If everything looks good, click Modify DB instance to save the changes.

–> If you need to make adjustments, click Back to edit.

12. After review, press Modify DB instance.

On the Status of the DB, you will see the status updating. Wait 15 minutes to 1 hour, depending on the changes and configuration of the database instance. It will then show as Available.

14. AWS RDS database update is done. Verified by connecting the DB Server and fire the following command to check the version:

select version();

POSTCHECK

Note: If the parameter group is different, you’ll need to create a new parameter group based on the default settings of the new DB version. Then, compare the old parameter group (assigned to the previous DB version) with the newly created one. Then only need to follow the following steps:

  1. Modify the necessary parameters in the new parameter group based on your comparison.
  2. Assign the new parameter group by going to AWS RDS, selecting the database, and clicking Modify in the RDS console.
  3. Choose the newly created parameter group for the database.
  4. Review the changes carefully.Select the Apply Immediately option.
  5. After applying the changes, reboot the database to ensure the new parameters take effect in AWS RDS MariaDB.

Leave a Reply