Migration Of Database From MySQL To Maria-DB Through Database Migration Service

Percy Alex Royan J
Tensult Blogs
Published in
4 min readSep 30, 2019

This Blog has moved from Medium to blogs.tensult.com. All the latest content will be available there. Subscribe to our newsletter to stay updated.

Ref:https://bit.ly/2nGxMA1

What is DMS ?

Database Migration Service is a tool for Migrating On-premises Database to AWS Cloud Services.Using this tool the Migration of the Data and changes can be done without any downtime.Migrations can be done from On-Precises to EC2,On-Premises to RDS,EC2 to RDS and RDS to RDS. It is a low cost effective Service.The Advantage of DMS is that in case of any interruption in the data it automatically restarts the process and continue migration from where it has stopped.

This above Image gives the basic explanation concept of DMS,let us move on with an example and take an MySQL database and migrate it to Maria-db database.

Migrating to Maria-db Database using AWS Database Migration Service:

Login to AWS console and open DMS service.

Create a Replication Instance as shown in the below Image

Replication Instance- It is an instance to connect the source data store and format the data store and also used by target data store to consume the data.It Provides high failure support with option of Multi-AZ.

After filling out the details based on your requirement select Create

Now the Next Step is to create the Endpoints,the endpoints points out the source and the destination of the databases.

First let us configure the Source endpoint

Source Endpoint-It is a Network Interface which identifies the source database or from which database the data needs to be taken.

As we can see in the above Image provide the details of the Source Database MySQL and provide the server name,username and password.

In here we have used AWS cloud to Cloud hence it is asking for the database name and if it is of On premises selecting database tab won’t be there.In that case it will ask for whatever On-premises database you are using.

And after creating the source endpoint we need to give a connection test so that we can know the endpoint is able to communicate with the source and the steps is shown in the below image,

And the next step is to create the target Endpoint,

Target Endpoint-It is Network Interface which identifies the target database or to which database the data to be copied.

Provide the details of the target database which the database to be migrated to and then provide the username and password of the target database and now also check the connection test as we have done for the source endpoint

After the test connection is successful, we move on the next step of creating the Database Migration Task,

Click on ‘Create Task’ button

And now provide the details of the task identifier ,source endpoint,target endpoint migration type and next is the task setting checkout based on your requirement the reference is mentioned on the below image,

And next under the Table mappings select add new selection rule and provide the schema name,table name and actions to be done as shown in the below image,

Next under the table mappings there is a option Transformation rule,select add a transformation rule and fill select the type it may be schema,table,column provide the details based on your requirement as mentioned in the below image,

Now create task and start the task and now it automatically moves the database without any interference of the running database and without any down time.

The Time taken for the completion of this task will vary based on the instance type and size of the data and this is how we migrate using the Database Migration Service.

Thank you.

--

--