Tiger Cloud: Performance, Scale, Enterprise

Self-hosted products

MST

MySQL is an open-source relational database management system (RDBMS).

This page shows you how to import data into your Tiger Cloud service from database running on MySQL version 8 or earlier.

Best practice is to use an Ubuntu EC2 instance hosted in the same region as your Tiger Cloud service as a migration machine. That is, the machine you run the commands on to move your data from your source database to your target Tiger Cloud service.

Before you migrate your data:

  • Create a target Tiger Cloud service.

    Each Tiger Cloud service has a single database that supports the most popular extensions. Tiger Cloud services do not support tablespaces, and there is no superuser associated with a service. Best practice is to create a Tiger Cloud service with at least 8 CPUs for a smoother experience. A higher-spec instance can significantly reduce the overall migration window.

  • To ensure that maintenance does not run during the process, adjust the maintenance window.

  • Install Docker on your migration machine.

    This machine needs sufficient space to store the buffered changes that occur while your data is being copied. This space is proportional to the amount of new uncompressed data being written to the Tiger Cloud service during migration. A general rule of thumb is between 100GB and 500GB.

For faster data transfer, best practice is for your source database, target service, and the system running the data import are in the same region .

To import data from a MySQL database:

  1. Setup the connection string for your target service

    This variable hold the connection information for the target Tiger Cloud service.

    In Terminal on the source machine, set the following:

    export TARGET=postgres://tsdbadmin:<PASSWORD>@<HOST>:<PORT>/tsdb?sslmode=require

    You find the connection information for your Tiger Cloud service in the configuration file you downloaded when you created the service.

  2. Setup the connection string for your source database

    SOURCE="mysql://<mysql_username>:<mysql_password>@<mysql_host>:<mysql_port>/<mysql_database>?sslmode=require"

    where:

    • <mysql_username>: your MySQL username
    • <mysql_password>: Your MySQL password
    • <mysql_host>: the MySQL server hostname or IP address
    • <mysql_port>: the MySQL server port, the default is 3306
    • <mysql_database>: the name of your MySQL database
  3. Import your data

    On your data import machine, run the following command:

    docker run -it ghcr.io/dimitri/pgloader:latest pgloader
    --no-ssl-cert-verification \
    "$SOURCE" \
    "$TARGET"
  4. Verify the data was imported correctly into your service

And that is it, you have imported your data from MySQL.

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.