We are migrating our MySql instance from version 5.5 in US to 5.6 in Sydney.
To reduce downtime I want to do following:
Create Readonly Replica in US
Upgrade it to 5.6
Enable automated Backup as it's required to replicate the instance
PROBLEM: When I'm trying to create a replica of a replica(selecting Sydney as destination region) I get this: "The source DB instance specified needs to be non read replica"
If I understand this http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html correctly it should be perfectly fine for me to create a replica of a replica, however I'm running out of ideas why it doesn't let me... Should I make it non-readonly?
UPDATE: It looks like you can create a Replica(5.6) of a Read Replica(5.6) in the same region, however I still have no luck creating a readReplica from a readReplica in another region.
I think you are missing the step of Promoting the Read Replica to fully functional stand-alone RDS instance.
Once you are through this step, you can then enable the Backups and Snapshots.
Excerpt From AWS Blog
Upgrade Support
Today we are enhancing Amazon RDS with the ability to upgrade your
MySQL DB Instances from version 5.5 to the latest release in the 5.6
series that's available on RDS.
To upgrade your existing instances, create a new Read Replica, upgrade it to MySQL 5.6, and once it has caught up to your existing
master, promote it to be the new master. You can initiate and
monitor each of these steps from the AWS Management Console. Refer to
the Upgrading from MySQL 5.5 to MySQL 5.6 section of the Amazon RDS
User Guide to learn more.
References : MySQL 5.5 to MySQL 5.6 Upgrade Support for Amazon RDS
Related
I was trying to use the AWS RDS Proxy service and realized that the only compatible versions with the service are AWS Aurora.
The current database I have is a MySQL database using MySQL version 8.0.20. AWS Aurora is MySQL compatible but only with version 5.6 and 5.7. I am not overly familiar with these versions and how different it would be to version 8.0.20.
Has anyone gone through the process of converting a MySQL database to Aurora? I know there are docs on the subject out there but they deal with version 5.6 or 5.7, has anyone done it for later versions?
I have all the MySQL code in SQL files along with the stored procedures so the database creation can be automated to an extent, it would just be if anyone has ran into issues doing it/found a better way than running multiple SQL files to transfer over data.
If you have gone through the process are there major differences between MySQL and Aurora in terms of running stored procedures etc?
MySQL 8 is now supported in AWS Aurora: https://aws.amazon.com/blogs/database/amazon-aurora-mysql-3-with-mysql-8-0-compatibility-is-now-generally-available/
They include the migration path in particular through a read replica promotion or full snapshot restore from rds into aurora.
Aurora 3.01.00 is the first public GA version of Aurora MySQL 8 released 2021-11-18 -- https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.3010.html
I've written a full tutorial of the upgrade process including the multiple options for pre-checks to ensure maximum compatibility at https://github.com/ronaldbradford/aws-tutorial/blob/main/rds/mysql-aurora-major-upgrade.md
I want to spin up a MySQL Docker container with the version of MySQL that matches closest to the AWS RDS version "5.7.mysql_aurora.2.08.1".
Would that be the MySQL image with the tag 5.7.20?
Is there someplace to look something like this up?
According to the Aurora documentation:
There isn't a one-to-one correspondence between community MySQL 5.6 or 5.7 versions and the Aurora MySQL 1.x and 2.x versions. To check which bug fixes and new features are in a particular Aurora MySQL release, see Database engine updates for Amazon Aurora MySQL 2.0 and Database engine updates for Amazon Aurora MySQL 1.1. For a chronological list of new features and releases, see Document history. To check the minimum version required for a security-related fix, see Security vulnerabilities fixed in Amazon Aurora MySQL.
I think you should feel comfortable using the latest mysql:5.7 docker image. This ensures your client has all the security fixes.
I have an AWS RDS MySQL 8.0 Community Edition DB. I need to enable audit in MySQL 8.0 (RDS). When I read the AWS documentation I found there is maria DB audit plugin for MySQL 5.6 and 5.7 later versions.
I checked the option groups of my db (mysql 8.0) but I couldn't find maria db audit plugin option, but for 5.6 and 5.7 its available.
Am I missing something here or are there any other audit plugins that can be used with MySQL 8.0 RDS instance ?
When a new RDS MySQL machine is launched, it has default Option and Parameter groups. If you need to enable MariaDB Audit Plugin, you need to create a new Option group and modify the same to enable MariaDB_Audit_Plugin and further set other options available under this plugin.
Once the New option group is all set, attach the same to the RDS MySQL machine, then apply changes immediately.
Also you can refer to the AWS Documentation below:
https://apg-library.amazonaws.com/content/bb362793-85b6-4fac-98dc-a99b558934ab
-- Iam not sure if you have access to the above Pattern as the same is yet to move to the public domain.
Having said that below document is over public and can guide you for your use case.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html
I had created a MySQL DB instance on RDS, following are the details:
Instance class - db.t2.micro
Engine version - 8.0.17
It is present in us-east-1 region.
Now I have to move my MySQL DB to Amazon Aurora, following were the documentation guides which i followed:
1- https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.RDSMySQL.Replica.html
On following the above guide i am only able to create a read replica. The option for creating a aurora replica is not visible. Also, when i create read replica it is created for mysql db and not gives me option to create for any other engine type.
2- https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.RDSMySQL.Import.html
On following the above guide, i am able to create snapshot for my mysql db instance. But, the option to 'Migrate Snapshot' is disabled. Could anyone please help me with this.
Could anyone also suggest me any other way in which i can migrate my MySQL db on RDS to Amazon Aurora?
Aurora MySQL is only supported for MySQL 5.6 and 5.7 unfortunately so the read replica solution would not work.
However, Amazon have you covered with the Database Migration Service.
AWS published a blog post on this, so take a read.
This is something i need to figure out, my company runs a number of prod RDS on AWS. Some of the mysql RDS run with 5.7 , i need to downgrade the mysql to 5.6 or 5.5 . Is this functionality provided by AWS.
Scenario: A mysql server already up and running with mysql version 5.7, Downgrade this to 5.6
-> If this is possible then what are the possible ways ?
-> How to do this ?
This is not something that AWS provides out of the box, however it can be solved with below 2 approaches depending on your database size and downtime that you can accept.
It might worth considering fixing application compatibility instead of downgrading DB which is more risky operation.
1. Dump, restore and switch method
Dump your currently running database with mysqldump utility. Start a new RDS instance with downgraded engine, load your dumped data into it. Switch your application to use RDS instance with downgraded engine.
2. Dump, restore, replicate & switch method
Dump your currently running database with mysqldump utility. Start a new RDS instance with downgraded MySQL engine, load your dumped data into it.
Set the new, downgraded DB instance as read replica of your old DB instance using mysql.rds_set_external_master and then start replication using mysql.rds_start_replication. Stop writes to your original DB, once the read replica catches up (you must monitor replication lag), run mysql.rds_reset_external_master which will promote your downgraded instance and turn off replication. Point your application to the downgraded RDS DB instance.
Method 2 will shorten your downtime to minimum, but is a bit more complex to execute. Here is a command reference to get familiar with to help you succeed: MySQL on Amazon RDS SQL Reference
You will find a great amount of examples in RDS documentation also - Importing and Exporting Data From a MySQL DB Instance: