MariaDB MySQL

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.

Prerequisites

Granting Privileges to a User

The database user specified in the Hevo Pipeline must have the following global privileges:

  • SELECT

  • SUPER or (REPLICATION_CLIENT and REPLICATION_SLAVE)

To set up these privileges:

  1. Go to your MariaB MySQL server. For example: mysql -u root -p

  2. Grant SELECT privileges to the user: GRANT SELECT ON *.* to jacob@localhost;`

  3. (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

  1. Open a secure MariaDB shell: mysql -u username -p

  2. Enter the password for the user:
  3. 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

  1. Login to your MariaDB server.

  2. View your MariaDB server configuration:

    sudo nano etc/mysql/mariadb.conf.d/50-server.cnf (This may be sudo nano /etc/my.cnf in some cases)

  3. 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
```
  1. Restart the MariaDB SQL server instance by entering the following command: sudo service mysql restart

  2. After restart, log in to the MariaDB server to check BinLog again: SELECT @@log_bin; The value returned is now 1`, 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.

Read BinLog Replication and BinLog Alerts.

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:

  1. Edit the MariaDB server configuration:

    sudo vim etc/mysql/mariadb.conf.d/50-server.cnf

  2. Scroll to [mysqld] and add: bind-address = 0.0.0.0 Or bind-address = 10.2.7.152 (Check the Hevo IP address for your region)

  3. Save the file.

Limitations

None.

Last updated on 21 Oct 2020