ON THIS PAGE
MariaDB is is a community-developed, commercially supported fork of the MySQL RDBMS, with the same database structure and indexes as MySQL.
You can ingest data from your MariaDB database using Hevo Pipelines and replicate it to a warehouse of your choice.
The MariaDB server (not localhost) is running. To check this, enter the following command in your MariaDB instance:
sudo systemctl status mariadbThe status must show as
Active: active (running).
The MySQL version is 5.1 or higher. To check this, enter the following command in your MariaDB instance:
mysql -- version
Binary Log (BinLog) replication is enabled, if Pipeline mode is BinLog.
Granting Privileges to a User
The database user specified in the Hevo Pipeline must have the following global privileges:
To set up these privileges:
Go to your MariaB MySQL server. For example:
mysql -u root -p
Grant SELECT privileges to the user:
GRANT SELECT ON *.* to jacob@localhost;`
(Optional) View the grants for the user:
show grants for jacob@localhost;`
Setting up MySQL Binary Logs for Replication
A binary log is a collection of log files that records information about data modifications and data object modifications made on a MySQL server instance. Typically binary logs are used for data replication and data recovery.
Hevo supports data ingestion for replication from MySQL servers via binary logs (BinLog). For this, binary logging must be enabled on your MySQL server. You can do this via the MySQL server configuration file or via server startup options to mysqld.
Follow these steps to set up BinLog replication:
1. Check if BinLog is already enabled
Open a secure MariaDB shell:
mysql -u username -p
- Enter the password for the user:
- Enter the command:
select @@log_bin;If this statement returns a value of
1, BinLog is active. If value returned is
0, this means that BinLog is disabled. To enable it, follow the steps below.
2. Enable BinLog replication
Login to your MariaDB server.
View your MariaDB server configuration:
sudo nano etc/mysql/mariadb.conf.d/50-server.cnf(This may be
sudo nano /etc/my.cnfin some cases)
In the configuration file, ensure the following configurations are specified. If not specified, add them now.
```[mysqld] binlog_format=ROW binlog_row_image=FULL server-id=1 expire_logs_days=3 log_bin=/var/log/mysql/mysql-bin.log) log_slave_updates=1 max_binlog_size = 100M ```
Restart the MariaDB SQL server instance by entering the following command:
sudo service mysql restart
After restart, log in to the MariaDB server to check BinLog again:
The value returned is now1`, indicating that BinLog is active.
Note: The retention period should ideally be at least 72 hours (3 days). This helps Hevo ensure that no log-file is missed from being read, specially when Historical Data loading is enabled.
The replication reference guide on MySQL’s documentation portal provides a complete reference of the options available for replication and binary logging.
Whitelisting Hevo’s IP Addresses
Follow these steps to whitelist the Hevo IP address for your region and enable Hevo to connect to your MariaDB database:
Edit the MariaDB server configuration:
sudo vim etc/mysql/mariadb.conf.d/50-server.cnf
Scroll to [mysqld] and add:
bind-address = 0.0.0.0Or
bind-address = 10.2.7.152(Check the Hevo IP address for your region)
Save the file.