Upgrading from Amazon RDS for MariaDB version 10.2

海外精选
海外精选的内容汇集了全球优质的亚马逊云科技相关技术内容。同时,内容中提到的“AWS” 是 “Amazon Web Services” 的缩写,在此网站不作为商标展示。
0
0
{"value":"[Amazon Relational Database Service (Amazon RDS) for MariaDB](https://aws.amazon.com/cn/rds/mariadb/) 10.2 major version is reaching end of life (EOL) on October 15, 2022. The end-of-life process ends standard support for this version. We recommend that you upgrade all MariaDB 10.2 DB instances to MariaDB 10.3 or higher as soon as possible. [Amazon Relational Database Service](https://aws.amazon.com/cn/rds/) ([Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail)) provides newer versions of databases, soon after community release, so you can keep your DB instances up to date. Newer DB versions include bug fixes, security enhancements, and other optimizations.\n\nWhen [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB supports a new version, you can choose how and when to upgrade your DB instances. [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB supports both major version and minor version upgrades. A major engine version upgrade can introduce changes that aren’t backward-compatible with existing applications, whereas minor version upgrades include only changes that are backward-compatible with existing applications. For the community release dates and EOL dates of all versions of MariaDB, see the [MariaDB Server maintenance policy.](https://mariadb.org/about/#maintenance-policy)\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB provides an option to automate some of these patching decisions, such as automatic minor version upgrades. However, major version upgrades must be requested explicitly. Therefore, it’s critical to be aware of common issues, steps involved, and use best practices to upgrade your major version with the least impact on your applications.\n\nIn this post, we look at the following topics:\n\n- [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2 end-of-life timeline\n- Available upgrade choices\n- Best practices to follow during the upgrade process\n\n### **[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2 major version end-of-life timeline**\n\nThe EOL timeline is as follows:\n- **Now through October 15, 2022, 00:00:01 AM UTC** – You can initiate upgrades of [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2 instances to MariaDB 10.3 or 10.6 at any time.\n- **July 15, 2022, 00:00:01 AM UTC** – After this date and time, you can’t create new RDS instances with MariaDB major version 10.2 from either the [AWS Management Console](https://aws.amazon.com/cn/console/) or the [AWS Command Line Interface](https://aws.amazon.com/cn/cli/) (AWS CLI). You can continue to restore your MariaDB 10.2 snapshots as well as create read replicas with version 10.2 until the October 15, 2022, end of support date.\n- **October 15, 2022, 00:00:01 AM UTC** – [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) will automatically upgrade MariaDB 10.2 instances to version 10.3 within the earliest scheduled maintenance window that follows. After this date and time, any restoration of RDS for MariaDB 10.2 database snapshots will result in an automatic upgrade of the restored database to a still supported version at the time.\n- **January 15, 2023, 00:00:01 AM UTC** – [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) will automatically upgrade any remaining MariaDB 10.2 instances to version 10.3 whether or not they are in a maintenance window.\n\nFor more information about the EOL dates for [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2, see [Announcement: Amazon Relational Database Service (Amazon RDS) for MariaDB 10.2 End-of-Life date is October 15, 2022.](https://repost.aws/questions/QUPGswEbHrT0m4tNgAVNmssw/announcement-amazon-relational-database-service-amazon-rds-for-maria-db-10-2-end-of-life-date-is-october-15-2022)\n\n### **Version upgrade choices in [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2**\n\nMajor version upgrades in [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB could go only from one major version to the next immediate major version until the release of RDS for MariaDB 10.6. To perform a major version upgrade to a MariaDB version lower than 10.6, upgrade to each major version in order. For example, to upgrade from version 10.2 to version 10.5, upgrade in the following order: 10.2 to 10.3, 10.3 to 10.4, and then 10.4 to 10.5.\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.6, released in February 2022, supports multi-major version upgrade. That is, you can upgrade any prior MariaDB major release (10.2, 10.3, 10.4, 10.5) to [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.6 in a single step. Moreover, you can take a snapshot of an existing MySQL 5.6 or 5.7 instance and use the RDS snapshot restore feature to convert it into a MariaDB 10.6 instance.\n\nTo summarize, [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) supports the following in-place upgrades for major versions of the MariaDB database engine:\n\n- Any supported MariaDB version to MariaDB 10.6\n- MariaDB 10.4 to MariaDB 10.5\n- MariaDB 10.3 to MariaDB 10.4\n- MariaDB 10.2 to MariaDB 10.3\n\nYou can also get a list of all valid upgrade target versions for a database version using the [describe-db-engine-versions](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html)\n AWS CLI command in a given Region:\n\n```\\naws rds describe-db-engine-versions --output=table --engine mariadb --engine-version 10.2\\n```\n\nAs part of deciding which version to upgrade to, you have the following options:\n\n- **MariaDB 10.3** – Community EOL planned for May 2023\n- **MariaDB 10.4** – Community EOL planned for June 2024\n- **MariaDB 10.5** – Community EOL planned for June 2025\n- **MariaDB 10.6** – Community EOL planned for July 2026\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.3, 10.4, 10.5 and, 10.6 will be available under standard support at least until the community EOL date. If you have any MariaDB 10.2 instances in your account, you can upgrade them before October 15, 2022. For instructions on upgrading a database instance, see [Upgrading the MariaDB DB engine.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MariaDB.html)\n\n### **Choosing a target engine version for upgrade**\n\nWe recommend you upgrade any of your RDS for MariaDB 10.2 DB instances to 10.3 (or greater) versions because they are supported at least until the community EOL date. We intend to support major version releases (for example, MariaDB 10.3, MariaDB 10.6) for at least 3 years after they are initially supported by [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail).\n\nWhen upgrading any database engine’s major versions, checking your application’s compatibility with the new version and its features plays a crucial role in the upgrade’s overall success. MariaDB database versions and releases can differ in how they work and interact with applications, which could result in compatibility issues. Therefore, it’s crucial to upgrade your RDS for MariaDB DB instances to a version that is compatible, certified, and supported by your application.\n\nIn certain cases, feature improvements and performance optimizations in newer releases also play a pivotal role in picking a target engine version for your upgrade.\n\nFor example, [MariaDB 10.3](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-3) offers improved Oracle compatibility, support for querying historical states of the database, features that increase flexibility for developers and DBAs, and improved manageability.\n\n[MariaDB 10.4](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-4) introduced several new features, which include an instant drop column operation, additional authentication capabilities, and a capability to reload new SSL certificates without restarting the server.\n\n[MariaDB 10.5](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-5) introduced several new features, such as native support for the JSON data type and built-in JSON functions, and query performance improvements via optimizer improvement, resulting in better parsing and explain plans. It also introduced dynamic buffer pool resizing and improved tablespace discovery for minimizing crash recovery duration.\n\nSimilarly, [MariaDB 10.6](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-6) introduces multiple MariaDB features to enhance the performance, scalability, reliability, and manageability of your workloads such as MyRocks storage engine, [AWS Identity and Access Management](https://aws.amazon.com/cn/iam/) (IAM) integration, flexible upgrades, delayed replication, Oracle PL/SQL compatibility, atomic DDL, and other enhancements like the JSON_TABLE function for transforming JSON data to relational format within SQL, faster empty table data load with Innodb, new ```sys_schema``` for analysis and troubleshooting, optimizer enhancements for ignoring unused indexes, and performance improvements.\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB versions 10.4 and higher supports the latest instance classes using [AWS Graviton2 processors](https://aws.amazon.com/cn/blogs/aws/new-amazon-rds-on-graviton2-processors/), such as r6g and m6g, which offer up to 35% better performance and up to 52% price-performance improvement for RDS open-source databases, based on internal testing of workloads with varying characteristics of compute and memory requirements.\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB versions 10.4 and higher is also offered on the latest [M6i and R6i instances](https://aws.amazon.com/cn/about-aws/whats-new/2022/04/amazon-rds-mariadb-m6i-r6i-new-instance-sizes/), powered by third-generation Intel Xeon Scalable processors with an all-core turbo frequency of 3.5 GHz, delivering up to 20% better transaction throughput over equivalent M5 and R5 instances.\n\n### **Downtime considerations for a major version upgrade**\n\n[Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB lets you manually initiate a major version upgrade by modifying the DB instance—either via the [AWS Management Console](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.Manual), [AWS CLI](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.Manual), or [Amazon RDS API.](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html) This is an in-place upgrade and requires downtime for your applications during the upgrade process. The duration of the upgrade process depends on the engine version and the DB instance class. You can determine the amount of time it takes to upgrade by performing trial upgrade exercises with a snapshot restore in a staging environment. Upgrading your production database instance is an irreversible process. If any issue occurs during or after the upgrade process, the only fallback option is to restore from the latest snapshot. As a best practice, always take a snapshot before initiating the upgrade.\n\nIf you’re running your DB instance in a Multi-AZ deployment, [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB upgrades both the primary and Multi-AZ synchronous standby simultaneously.\n\nIf your RDS for MariaDB DB instance is in use with a production application, you can reduce the amount of downtime for your application by using a read replica to perform most of your maintenance tasks ahead of time. This method involves setting up a logical read replica that has the same major and minor version as the primary instance, then upgrading the read replica to a newer version and ensuring that all validation steps for the application pass through. When this is done, make sure the replication has caught up completely by stopping further application writes to ensure data integrity. Then promote the read replica to a standalone instance and point your application to the upgraded, promoted instance that has the up-to-date data.\n\n### **How [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB performs a major version upgrade**\n\nWhen a major version upgrade is invoked on the console or via the AWS CLI or [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) API, [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) automation completes the following steps:\n\n1. Verifies if any read replicas need to be upgraded.\n2. Takes a pre-upgrade snapshot (if backups are enabled on the RDS for MariaDB DB instance). This snapshot can be used for rollback purposes if the upgrade encounters any issues.\n3. Shuts down the instance and prepares the instance for upgrade.\n4. Runs the [mysql_upgrade](https://mariadb.com/kb/en/mysql_upgrade/) script to upgrade tables to the newer version.\n5. Takes a post-upgrade snapshot.\n\n### **Key considerations and best practices**\n\nWhen performing an upgrade, consider the following:\n\n- If your RDS for MariaDB DB instance is using read replicas, you must upgrade all the read replicas before upgrading the source instance.\n- Take a manual snapshot using the ```create-db-snapshot``` AWS CLI command or via the console prior to starting the upgrade phase.\n- If your RDS for MariaDB 10.2 instances are running on one of the deprecated t1, m1, or m2 instance types, you have to change to a newer instance type prior to initiating the major version upgrade. You can identify any RDS for MariaDB DB instances running the older instance types via the console or the ```describe-db-instances``` AWS CLI command.\n- [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) truncates the ```slow_log``` and ```general_log``` tables during a major version upgrade. To preserve log information, back up the log contents before the major version upgrade. Take a table-level backup of the ```slow_log``` and ```general_log``` tables using the following code:\n\n\t```\\n\\tmysqldump -h <RDS-instance-endpoint> -u <username> -p --databases mysql --tables slow_log --skip-lock-tables > filename.sql\\n\\t```\n- By default, when upgrading from one major version to next higher major version, [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB chooses the default option group if the corresponding custom option group for the target version isn’t chosen. Always choose to have a custom option group created in the target version that reflects the options that you have from the version you’re upgrading from.\n- [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) creates a new parameter group for the target upgrade version automatically during a major version upgrade if one isn’t provided. For RDS for MariaDB DB instances using custom parameter groups, when upgrading, always choose a parameter group in the target version that matches your current version parameter group with similar parameters carrying similar or same values. If the parameters don’t exist or have their default values changed between versions, carefully test and validate the results and behavior prior to upgrading the instance.\n- Disable any jobs prior to upgrading and ensure you enable them post-upgrade. Also test job behavior in a lower environment prior to performing the actual database upgrade process.\n- Perform an overall benchmark for the application to understand if there are any dependencies and application behavior deviation in a lower environment prior to performing the major version upgrade in the production environment.\n- Keep a list of clients and their drivers used along with the appropriate version numbers. Identify that these clients and their drivers work with newer versions of MariaDB.\n- Post-upgrade, we strongly recommend you test your automated backup restore process, disaster recovery, or production to non-production refresh procedures.\n\n### **Conclusion**\n\nIn this post, we reviewed the MariaDB 10.2 EOL support timeline in [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail), assessed version upgrade choices, and advised on how to pick a target version for upgrade. Finally, we covered the best practices and what to expect during the upgrade process. With [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2 reaching end of standard support on October 15, 2022, we encourage you to upgrade your RDS for MariaDB 10.2 instances to [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.3 (or greater) at the earliest to test out the version upgrades, validate your applications, and take advantage of features and optimizations available on newer versions.\n\n#### **About the Author**\n\n![image.png](https://dev-media.amazoncloud.cn/d6fe6c9a53614282a7f68c8ea178e089_image.png)\n\n**Vijay Karumajji** is a Database Solutions Architect with Amazon Web Services. He works with our customers to provide guidance and technical assistance on database projects, helping them improve the value of their solutions when using AWS.\n","render":"<p><a href=\\"https://aws.amazon.com/cn/rds/mariadb/\\" target=\\"_blank\\">Amazon Relational Database Service (Amazon RDS) for MariaDB</a> 10.2 major version is reaching end of life (EOL) on October 15, 2022. The end-of-life process ends standard support for this version. We recommend that you upgrade all MariaDB 10.2 DB instances to MariaDB 10.3 or higher as soon as possible. <a href=\\"https://aws.amazon.com/cn/rds/\\" target=\\"_blank\\">Amazon Relational Database Service</a> ([Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail)) provides newer versions of databases, soon after community release, so you can keep your DB instances up to date. Newer DB versions include bug fixes, security enhancements, and other optimizations.</p>\\n<p>When Amazon RDS for MariaDB supports a new version, you can choose how and when to upgrade your DB instances. Amazon RDS for MariaDB supports both major version and minor version upgrades. A major engine version upgrade can introduce changes that aren’t backward-compatible with existing applications, whereas minor version upgrades include only changes that are backward-compatible with existing applications. For the community release dates and EOL dates of all versions of MariaDB, see the <a href=\\"https://mariadb.org/about/#maintenance-policy\\" target=\\"_blank\\">MariaDB Server maintenance policy.</a></p>\\n<p>Amazon RDS for MariaDB provides an option to automate some of these patching decisions, such as automatic minor version upgrades. However, major version upgrades must be requested explicitly. Therefore, it’s critical to be aware of common issues, steps involved, and use best practices to upgrade your major version with the least impact on your applications.</p>\n<p>In this post, we look at the following topics:</p>\n<ul>\\n<li>Amazon RDS for MariaDB 10.2 end-of-life timeline</li>\n<li>Available upgrade choices</li>\n<li>Best practices to follow during the upgrade process</li>\n</ul>\\n<h3><a id=\\"Amazon_RDS_for_MariaDB_102_major_version_endoflife_timeline_12\\"></a><strong>Amazon RDS for MariaDB 10.2 major version end-of-life timeline</strong></h3>\\n<p>The EOL timeline is as follows:</p>\n<ul>\\n<li><strong>Now through October 15, 2022, 00:00:01 AM UTC</strong> – You can initiate upgrades of [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) for MariaDB 10.2 instances to MariaDB 10.3 or 10.6 at any time.</li>\\n<li><strong>July 15, 2022, 00:00:01 AM UTC</strong> – After this date and time, you can’t create new RDS instances with MariaDB major version 10.2 from either the <a href=\\"https://aws.amazon.com/cn/console/\\" target=\\"_blank\\">AWS Management Console</a> or the <a href=\\"https://aws.amazon.com/cn/cli/\\" target=\\"_blank\\">AWS Command Line Interface</a> (AWS CLI). You can continue to restore your MariaDB 10.2 snapshots as well as create read replicas with version 10.2 until the October 15, 2022, end of support date.</li>\\n<li><strong>October 15, 2022, 00:00:01 AM UTC</strong> – [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) will automatically upgrade MariaDB 10.2 instances to version 10.3 within the earliest scheduled maintenance window that follows. After this date and time, any restoration of RDS for MariaDB 10.2 database snapshots will result in an automatic upgrade of the restored database to a still supported version at the time.</li>\\n<li><strong>January 15, 2023, 00:00:01 AM UTC</strong> – [Amazon RDS](https://aws.amazon.com/cn/rds/?trk=cndc-detail) will automatically upgrade any remaining MariaDB 10.2 instances to version 10.3 whether or not they are in a maintenance window.</li>\\n</ul>\n<p>For more information about the EOL dates for Amazon RDS for MariaDB 10.2, see <a href=\\"https://repost.aws/questions/QUPGswEbHrT0m4tNgAVNmssw/announcement-amazon-relational-database-service-amazon-rds-for-maria-db-10-2-end-of-life-date-is-october-15-2022\\" target=\\"_blank\\">Announcement: Amazon Relational Database Service (Amazon RDS) for MariaDB 10.2 End-of-Life date is October 15, 2022.</a></p>\\n<h3><a id=\\"Version_upgrade_choices_in_Amazon_RDS_for_MariaDB_102_22\\"></a><strong>Version upgrade choices in Amazon RDS for MariaDB 10.2</strong></h3>\\n<p>Major version upgrades in Amazon RDS for MariaDB could go only from one major version to the next immediate major version until the release of RDS for MariaDB 10.6. To perform a major version upgrade to a MariaDB version lower than 10.6, upgrade to each major version in order. For example, to upgrade from version 10.2 to version 10.5, upgrade in the following order: 10.2 to 10.3, 10.3 to 10.4, and then 10.4 to 10.5.</p>\n<p>Amazon RDS for MariaDB 10.6, released in February 2022, supports multi-major version upgrade. That is, you can upgrade any prior MariaDB major release (10.2, 10.3, 10.4, 10.5) to Amazon RDS for MariaDB 10.6 in a single step. Moreover, you can take a snapshot of an existing MySQL 5.6 or 5.7 instance and use the RDS snapshot restore feature to convert it into a MariaDB 10.6 instance.</p>\n<p>To summarize, Amazon RDS supports the following in-place upgrades for major versions of the MariaDB database engine:</p>\n<ul>\\n<li>Any supported MariaDB version to MariaDB 10.6</li>\n<li>MariaDB 10.4 to MariaDB 10.5</li>\n<li>MariaDB 10.3 to MariaDB 10.4</li>\n<li>MariaDB 10.2 to MariaDB 10.3</li>\n</ul>\\n<p>You can also get a list of all valid upgrade target versions for a database version using the <a href=\\"https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html\\" target=\\"_blank\\">describe-db-engine-versions</a><br />\\nAWS CLI command in a given Region:</p>\n<pre><code class=\\"lang-\\">aws rds describe-db-engine-versions --output=table --engine mariadb --engine-version 10.2\\n</code></pre>\\n<p>As part of deciding which version to upgrade to, you have the following options:</p>\n<ul>\\n<li><strong>MariaDB 10.3</strong> – Community EOL planned for May 2023</li>\\n<li><strong>MariaDB 10.4</strong> – Community EOL planned for June 2024</li>\\n<li><strong>MariaDB 10.5</strong> – Community EOL planned for June 2025</li>\\n<li><strong>MariaDB 10.6</strong> – Community EOL planned for July 2026</li>\\n</ul>\n<p>Amazon RDS for MariaDB 10.3, 10.4, 10.5 and, 10.6 will be available under standard support at least until the community EOL date. If you have any MariaDB 10.2 instances in your account, you can upgrade them before October 15, 2022. For instructions on upgrading a database instance, see <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MariaDB.html\\" target=\\"_blank\\">Upgrading the MariaDB DB engine.</a></p>\\n<h3><a id=\\"Choosing_a_target_engine_version_for_upgrade_51\\"></a><strong>Choosing a target engine version for upgrade</strong></h3>\\n<p>We recommend you upgrade any of your RDS for MariaDB 10.2 DB instances to 10.3 (or greater) versions because they are supported at least until the community EOL date. We intend to support major version releases (for example, MariaDB 10.3, MariaDB 10.6) for at least 3 years after they are initially supported by Amazon RDS.</p>\n<p>When upgrading any database engine’s major versions, checking your application’s compatibility with the new version and its features plays a crucial role in the upgrade’s overall success. MariaDB database versions and releases can differ in how they work and interact with applications, which could result in compatibility issues. Therefore, it’s crucial to upgrade your RDS for MariaDB DB instances to a version that is compatible, certified, and supported by your application.</p>\n<p>In certain cases, feature improvements and performance optimizations in newer releases also play a pivotal role in picking a target engine version for your upgrade.</p>\n<p>For example, <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-3\\" target=\\"_blank\\">MariaDB 10.3</a> offers improved Oracle compatibility, support for querying historical states of the database, features that increase flexibility for developers and DBAs, and improved manageability.</p>\\n<p><a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-4\\" target=\\"_blank\\">MariaDB 10.4</a> introduced several new features, which include an instant drop column operation, additional authentication capabilities, and a capability to reload new SSL certificates without restarting the server.</p>\\n<p><a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-5\\" target=\\"_blank\\">MariaDB 10.5</a> introduced several new features, such as native support for the JSON data type and built-in JSON functions, and query performance improvements via optimizer improvement, resulting in better parsing and explain plans. It also introduced dynamic buffer pool resizing and improved tablespace discovery for minimizing crash recovery duration.</p>\\n<p>Similarly, <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.FeatureSupport.10-6\\" target=\\"_blank\\">MariaDB 10.6</a> introduces multiple MariaDB features to enhance the performance, scalability, reliability, and manageability of your workloads such as MyRocks storage engine, <a href=\\"https://aws.amazon.com/cn/iam/\\" target=\\"_blank\\">AWS Identity and Access Management</a> (IAM) integration, flexible upgrades, delayed replication, Oracle PL/SQL compatibility, atomic DDL, and other enhancements like the JSON_TABLE function for transforming JSON data to relational format within SQL, faster empty table data load with Innodb, new <code>sys_schema</code> for analysis and troubleshooting, optimizer enhancements for ignoring unused indexes, and performance improvements.</p>\\n<p>Amazon RDS for MariaDB versions 10.4 and higher supports the latest instance classes using <a href=\\"https://aws.amazon.com/cn/blogs/aws/new-amazon-rds-on-graviton2-processors/\\" target=\\"_blank\\">AWS Graviton2 processors</a>, such as r6g and m6g, which offer up to 35% better performance and up to 52% price-performance improvement for RDS open-source databases, based on internal testing of workloads with varying characteristics of compute and memory requirements.</p>\\n<p>Amazon RDS for MariaDB versions 10.4 and higher is also offered on the latest <a href=\\"https://aws.amazon.com/cn/about-aws/whats-new/2022/04/amazon-rds-mariadb-m6i-r6i-new-instance-sizes/\\" target=\\"_blank\\">M6i and R6i instances</a>, powered by third-generation Intel Xeon Scalable processors with an all-core turbo frequency of 3.5 GHz, delivering up to 20% better transaction throughput over equivalent M5 and R5 instances.</p>\\n<h3><a id=\\"Downtime_considerations_for_a_major_version_upgrade_71\\"></a><strong>Downtime considerations for a major version upgrade</strong></h3>\\n<p>Amazon RDS for MariaDB lets you manually initiate a major version upgrade by modifying the DB instance—either via the <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.Manual\\" target=\\"_blank\\">AWS Management Console</a>, <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.Manual\\" target=\\"_blank\\">AWS CLI</a>, or <a href=\\"https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Operations.html\\" target=\\"_blank\\">Amazon RDS API.</a> This is an in-place upgrade and requires downtime for your applications during the upgrade process. The duration of the upgrade process depends on the engine version and the DB instance class. You can determine the amount of time it takes to upgrade by performing trial upgrade exercises with a snapshot restore in a staging environment. Upgrading your production database instance is an irreversible process. If any issue occurs during or after the upgrade process, the only fallback option is to restore from the latest snapshot. As a best practice, always take a snapshot before initiating the upgrade.</p>\\n<p>If you’re running your DB instance in a Multi-AZ deployment, Amazon RDS for MariaDB upgrades both the primary and Multi-AZ synchronous standby simultaneously.</p>\n<p>If your RDS for MariaDB DB instance is in use with a production application, you can reduce the amount of downtime for your application by using a read replica to perform most of your maintenance tasks ahead of time. This method involves setting up a logical read replica that has the same major and minor version as the primary instance, then upgrading the read replica to a newer version and ensuring that all validation steps for the application pass through. When this is done, make sure the replication has caught up completely by stopping further application writes to ensure data integrity. Then promote the read replica to a standalone instance and point your application to the upgraded, promoted instance that has the up-to-date data.</p>\n<h3><a id=\\"How_Amazon_RDS_for_MariaDB_performs_a_major_version_upgrade_79\\"></a><strong>How Amazon RDS for MariaDB performs a major version upgrade</strong></h3>\\n<p>When a major version upgrade is invoked on the console or via the AWS CLI or Amazon RDS API, Amazon RDS automation completes the following steps:</p>\n<ol>\\n<li>Verifies if any read replicas need to be upgraded.</li>\n<li>Takes a pre-upgrade snapshot (if backups are enabled on the RDS for MariaDB DB instance). This snapshot can be used for rollback purposes if the upgrade encounters any issues.</li>\n<li>Shuts down the instance and prepares the instance for upgrade.</li>\n<li>Runs the <a href=\\"https://mariadb.com/kb/en/mysql_upgrade/\\" target=\\"_blank\\">mysql_upgrade</a> script to upgrade tables to the newer version.</li>\\n<li>Takes a post-upgrade snapshot.</li>\n</ol>\\n<h3><a id=\\"Key_considerations_and_best_practices_89\\"></a><strong>Key considerations and best practices</strong></h3>\\n<p>When performing an upgrade, consider the following:</p>\n<ul>\\n<li>\\n<p>If your RDS for MariaDB DB instance is using read replicas, you must upgrade all the read replicas before upgrading the source instance.</p>\n</li>\\n<li>\\n<p>Take a manual snapshot using the <code>create-db-snapshot</code> AWS CLI command or via the console prior to starting the upgrade phase.</p>\\n</li>\n<li>\\n<p>If your RDS for MariaDB 10.2 instances are running on one of the deprecated t1, m1, or m2 instance types, you have to change to a newer instance type prior to initiating the major version upgrade. You can identify any RDS for MariaDB DB instances running the older instance types via the console or the <code>describe-db-instances</code> AWS CLI command.</p>\\n</li>\n<li>\\n<p>Amazon RDS truncates the <code>slow_log</code> and <code>general_log</code> tables during a major version upgrade. To preserve log information, back up the log contents before the major version upgrade. Take a table-level backup of the <code>slow_log</code> and <code>general_log</code> tables using the following code:</p>\\n<pre><code class=\\"lang-\\">mysqldump -h &lt;RDS-instance-endpoint&gt; -u &lt;username&gt; -p --databases mysql --tables slow_log --skip-lock-tables &gt; filename.sql\\n</code></pre>\\n</li>\n<li>\\n<p>By default, when upgrading from one major version to next higher major version, Amazon RDS for MariaDB chooses the default option group if the corresponding custom option group for the target version isn’t chosen. Always choose to have a custom option group created in the target version that reflects the options that you have from the version you’re upgrading from.</p>\n</li>\\n<li>\\n<p>Amazon RDS creates a new parameter group for the target upgrade version automatically during a major version upgrade if one isn’t provided. For RDS for MariaDB DB instances using custom parameter groups, when upgrading, always choose a parameter group in the target version that matches your current version parameter group with similar parameters carrying similar or same values. If the parameters don’t exist or have their default values changed between versions, carefully test and validate the results and behavior prior to upgrading the instance.</p>\n</li>\\n<li>\\n<p>Disable any jobs prior to upgrading and ensure you enable them post-upgrade. Also test job behavior in a lower environment prior to performing the actual database upgrade process.</p>\n</li>\\n<li>\\n<p>Perform an overall benchmark for the application to understand if there are any dependencies and application behavior deviation in a lower environment prior to performing the major version upgrade in the production environment.</p>\n</li>\\n<li>\\n<p>Keep a list of clients and their drivers used along with the appropriate version numbers. Identify that these clients and their drivers work with newer versions of MariaDB.</p>\n</li>\\n<li>\\n<p>Post-upgrade, we strongly recommend you test your automated backup restore process, disaster recovery, or production to non-production refresh procedures.</p>\n</li>\\n</ul>\n<h3><a id=\\"Conclusion_108\\"></a><strong>Conclusion</strong></h3>\\n<p>In this post, we reviewed the MariaDB 10.2 EOL support timeline in Amazon RDS, assessed version upgrade choices, and advised on how to pick a target version for upgrade. Finally, we covered the best practices and what to expect during the upgrade process. With Amazon RDS for MariaDB 10.2 reaching end of standard support on October 15, 2022, we encourage you to upgrade your RDS for MariaDB 10.2 instances to Amazon RDS for MariaDB 10.3 (or greater) at the earliest to test out the version upgrades, validate your applications, and take advantage of features and optimizations available on newer versions.</p>\n<h4><a id=\\"About_the_Author_112\\"></a><strong>About the Author</strong></h4>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/d6fe6c9a53614282a7f68c8ea178e089_image.png\\" alt=\\"image.png\\" /></p>\n<p><strong>Vijay Karumajji</strong> is a Database Solutions Architect with Amazon Web Services. He works with our customers to provide guidance and technical assistance on database projects, helping them improve the value of their solutions when using AWS.</p>\n"}
目录
亚马逊云科技解决方案 基于行业客户应用场景及技术领域的解决方案
联系亚马逊云科技专家
亚马逊云科技解决方案
基于行业客户应用场景及技术领域的解决方案
联系专家
0
目录
关闭