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개 답변
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인