This migration document focuses on the migration of the applications supported by Elestio. Find the software list here
This document provides a step-by-step guide for migrating your existing MySQL database system to Elestio. Elestio is designed to enhance performance, scalability, and overall system efficiency. Before you begin the migration process, make sure to check the pre-requisites
- Create an account on Elestio
- Log in to your MySQL admin dashboard account where your current site/pages are hosted
- Make sure the UI for the application is working fine and there are no critical errors detected in the application logs. If found otherwise please feel free to create a support ticket
- When deploying the service on Elestio, use the same software version as your present service, or your data migration will fail
2️⃣ Exporting the Data
- Head over to your Phpmyadmin UI with Admin credentials and make sure you are logged in and can see your database, table, and data
- For this example, we are going to migrate the Library Management database that has 2 tables: Books and Library
- This is the dummy data under the Books table to verify the migration
- Here, you can choose to migrate/export specific tables or entire databases. For this tutorial, I am going to export the entire database with all the tables
- For this, click on your database so it shows the list of all the tables like below, and head over to the "Export" option from the above option panel
- You can use the "Quick" Option like below or go to custom and tweak the setting for exports as you need
- Click on "Export" and save the file to your local machine. The file being downloaded will have
.sqlextension because we have selected the format as SQL from above. Feel free to change the format if required.
- With this, your database is exported
3️⃣ Importing the Data
- Login to your Elestio account
- Go to Create Services and select "MySQL"
- Select your service provider, region, and machine preferences
- Name your service, configurations, and support layer, and hit "Create Service"
- Once running, head over to the service and use the credentials provided under "Admin UI" to access the PhpMyAdmin UI
- Once you are in, head over to the UI you should go ahead and create your database. We will be creating a database with Name Migrated Library to see the difference after the migration
- Click on the database head over to the "Import" option from the top option bar, and choose the file from your local machine that you downloaded from the previous step.
- Remember that if you used the custom settings in the import section then you might want to change the options from the default while importing too, else it will raise an error
- After uploading the essential .SQL file, scroll down and click on "Import"
- The tables and data will get imported and can be seen under the database we created on Elestio instance
Voila 🎉 you have successfully imported your tables and data to your new instance of MySQL.
4️⃣ Testing the Migration
- You have successfully migrated to Elestio, now it's time for testing if your application is running as you intended
- Head over to the tables and check if you can still see the data like your previous instance
- Here as you can see, my new database has successfully imported the tables and the data as I showed during the import
5️⃣ Need additional help?
Stuck somewhere? We are here to help you, go ahead and create a support ticket and we will get back to you in no time.
Originally published at https://docs.elest.io on November 13, 2023.