Importing data into a MariaDB DB instance - Amazon Relational Database Service

Importing data into a MariaDB DB instance

You can use several different techniques to import data into an RDS for MariaDB DB instance. The best approach depends on the source of the data, the amount of data, and whether the import is done one time or is ongoing. If you are migrating an application along with the data, also consider the amount of downtime that you are willing to experience.

Find techniques to import data into an RDS for MariaDB DB instance in the following table.

Source Amount of data One time or ongoing Application downtime Technique More information
Existing MariaDB DB instance Any One time or ongoing Minimal Create a read replica for ongoing replication. Promote the read replica for one-time creation of a new DB instance. Working with DB instance read replicas
Existing MariaDB or MySQL database Small One time Some Copy the data directly to your MySQL DB instance using a command-line utility. Importing data from a MariaDB or MySQL database to a MariaDB or MySQL DB instance
Data not stored in an existing database Medium One time Some Create flat files and import them using the mysqlimport utility. Importing data from any source to a MariaDB or MySQL DB instance
Existing MariaDB or MySQL database on premises or on Amazon EC2 Any Ongoing Minimal

Configure replication with an existing MariaDB or MySQL database as the replication source.

You can configure replication into a MariaDB DB instance using MariaDB global transaction identifiers (GTIDs) when the external instance is MariaDB version 10.0.24 or higher, or using binary log coordinates for MySQL instances or MariaDB instances on earlier versions than 10.0.24. MariaDB GTIDs are implemented differently than MySQL GTIDs, which aren't supported by Amazon RDS.

Configuring binary log file position replication with an external source instance

Importing data to an Amazon RDS MariaDB or MySQL DB instance with reduced downtime

Any existing database Any One time or ongoing Minimal Use AWS Database Migration Service to migrate the database with minimal downtime and, for many database DB engines, continue ongoing replication. What is AWS Database Migration Service and Using a MySQL-compatible database as a target for AWS DMS in the AWS Database Migration Service User Guide
Note

The mysql system database contains authentication and authorization information required to log into your DB instance and access your data. Dropping, altering, renaming, or truncating tables, data, or other contents of the mysql database in your DB instance can result in errors and might render the DB instance and your data inaccessible. If this occurs, the DB instance can be restored from a snapshot using the AWS CLI restore-db-instance-from-db-snapshot or recovered using restore-db-instance-to-point-in-time commands.