How to export / import rows reliably from one MySQL RDS server to another

0

I have looked, but haven't found a reliable way of exporting rows from a MySQL DB on one RDS instance and importing them on another RDS MySQL instance. I have tried MySQL Workbench, and it mostly works, but fails when there are double quotes in a field.

asked 2 years ago1270 views
2 Answers
0

Hello Ron,

I understand that you are looking for a reliable way of exporting rows from a MySQL DB on one RDS instance and importing them on another RDS MySQL instance. Please note that there is currently no way to specify rows when performing exporting of importing of data. However, you can perform replication to export and import data from an RDS for MySQL DB instance to another RDS MySQL DB instance

The replication process is as follows:

  1. Prepare the source MySQL DB instance
  • For this process, please see reference [1]: Prepare the source MySQL DB instance
  1. Copy the database
  • See reference [1]: Copy the Database
  1. Import the data into the target RDS MySQL DB instance
  • The method/technique for this action is to create a read replica for ongoing replication. Promote the read replica for one-time creation of a new DB instance. To create and configure a MySQL read replica, see reference [2].

You can also consider using mysqldump which is a separate tool where you can specify databases to export and import, see reference [3] for MySQL documentation.

References:

[1] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Exporting.NonRDSRepl.html

[2] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_MySQL.Replication.ReadReplicas.html

[3] https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

answered 2 years ago
0

Hi Ron You can replicate tables using AWS DMS. DMS can connect to a variety of source and target endpoints. On the task definition, you need to specify the schema and table that you want to replicate. There are 3 method to replicate; full, full + cdc and cdc only.

You can find more information in the following links

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.html

Best Regards Agusti

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions