> For the complete documentation index, see [llms.txt](https://docs.vngcloud.vn/vng-cloud-document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vngcloud.vn/vng-cloud-document/vdb/relational-database-service-rds/working-with-rds/import-du-lieu-vao-rds-instance-mysql-mariadb-bang-mysqldump.md).

# Import Data into RDS Instance (MySQL/MariaDB) using mysqldump

To import data into an RDS Instance with a MySQL/MariaDB datastore, you can use the **mysqldump** tool.

Follow these steps to perform the import:

#### 1. Dump Data from Your MySQL Server:

On your MySQL server, you can list the databases you have by running the following command:

```sql
mysql> show databases;
```

Identify the databases you want to import (for example: `mysql02`, `mysql03`, `mysql04`).

**Note**: RDS Instances do not support importing system databases like `mysql`, `performance_schema`, `information_schema`, and `sys`. Please skip these databases.

Once you have the list of databases to transfer, you can dump the data using the `mysqldump` command with the following format:

```bash
mysqldump -h<Local_DB_IP> -P<Local_DB_Port> -u<Local_DB_User> -p --single-transaction --routines --triggers --databases <Your_DB_List> > dump-database.sql
```

Where:

* **Local\_DB\_IP**: Your MySQL server's IP address.
* **Local\_DB\_Port**: Your MySQL server's port.
* **Local\_DB\_User**: The user on your MySQL server.
* **Your\_DB\_List**: The list of databases you want to dump, separated by spaces. For example: `mysql02 mysql03 mysql04`.

This will generate a file named **dump-database.sql** containing the data to import.

#### 2. Import Data into RDS Instance:

To perform the import, you will use the **Master User** created when you set up the RDS Instance.

You can run the following command:

```bash
mysql -h<RDS_Instance_IP> -P3306 -u<RDS_Instance_Master_User> -p < dump-database.sql
```

Where:

* **RDS\_Instance\_IP**: The IP address of the RDS Instance.
* **RDS\_Instance\_Master\_User**: The Master User assigned when the RDS Instance was created.

Depending on the size of your data, the import process may take some time.

This guide outlines the steps to import data into an RDS Instance with a MySQL/MariaDB datastore. Good luck with your import!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vngcloud.vn/vng-cloud-document/vdb/relational-database-service-rds/working-with-rds/import-du-lieu-vao-rds-instance-mysql-mariadb-bang-mysqldump.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
