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.

已提問 2 年前檢視次數 1289 次
2 個答案
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

已回答 2 年前
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南