Azure MariaDB Database Setup Guide
Note: You can connect Fivetran to a read replica of your Azure MariaDB database to ensure that we don't add any strain to your master database. Many production environments include a read replica by default; if yours doesn't, you can create one.
Follow these instructions to replicate your Azure MariaDB database to your destination via Fivetran.
To connect your MariaDB database to Fivetran, you need:
- MariaDB 10.1.2 or above
- IP (e.g. 184.108.40.206) or host (your.server.com)
- Port (usually 3306)
MariaDB versions earlier than 10.1.2 may function correctly with the exception of fractional seconds in TIME, TIMESTAMP, and DATETIME columns. Prior to version 10.1.2, fractional seconds were stored differently, which causes problems with our incremental updates.
For the prerequisites for connecting via an SSH tunnel, see Fivetran's Connection Options page.
The replica ID is a unique ID within the MariaDB replica set. It must be an integer different from all other master and replica server IDs within the same group. By default, the replica ID is a random integer greater than 1000.
Choose your connection option
First, decide whether to connect Fivetran to your Azure MariaDB database directly or through an SSH tunnel. How you configure security groups will differ based on your connection method.
Fivetran connects directly to your database instance.
Connect via SSH
Fivetran connects to a separate server in your network which provides an SSH tunnel to your database. You must connect through SSH if your database is contained within an inaccessible subnet. If you have an SSH connection, follow these instructions before you proceed to the next step.
Allow Fivetran to access your database
You must configure your firewall to grant Fivetran access to your database.
Open the SQL database firewall settings in the Azure console
In the Azure console, select your Azure MariaDB resource.
Open the Connection security tab.
Add a new firewall rule
- If you are connecting directly, create a new rule using Fivetran's IP as both the Start IP and End IP. If you are connecting through SSH, use your tunnel server's IP.
- Click Save.
Create a Fivetran user
Next, create a Fivetran user for your Azure MariaDB database. If you are connecting Fivetran to a read replica, you must create the user on your master database because read replicas are read-only. Your read replica will inherit the user from your master database.
Open a connection to your Azure MariaDB database using your favorite SQL tool (for example, MariaDB Workbench or the
mysqlcommand in your operating system's terminal window).
Create a Fivetran user and grant replication permissions by running the following SQL commands. Replace
'password'with a password of your choice.
CREATE USER fivetran@'%' IDENTIFIED BY 'password'; GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO fivetran@'%';
If there are errors when running these commands, you may lack sufficient privileges and should contact your database administrator.
Set binary log format to ROW
By default, Azure MariaDB's binary log format is MIXED. You cannot alter this system setting from the Azure dashboard or from any database tool. To change your binary log format to ROW, file a ticket with Microsoft Azure support. Fivetran needs ROW format binary logs to perform incremental updates.
Select schema and tables
Select which schemas and tables you'd like to sync to your destination.
Choose a schema prefix
Fivetran maps the schemas we discover in your source database to your destination and prepends the destination schema names with a prefix of your choice. For example, if your original database contains schemas
bar and if you choose the prefix
pre, then your destination schemas will be