MariaDB Connection
  • 1 Minute to read
  • Dark
    Light
  • PDF

MariaDB Connection

  • Dark
    Light
  • PDF

Article Summary

Introduction

This document provides a step-by-step guide on establishing a connection to a MariaDB database using Rivery, a data integration platform. It outlines the prerequisites, connection setup process, SSL options, and the recommended method of using SSH tunneling for secure connections.

Prerequisites

Before proceeding with creating a connection to MariaDB in Rivery, ensure the following prerequisites are met:

  • Database credentials must be set up in MariaDB.
  • Knowledge of the host, port, database name, username, and password for the MariaDB server.
  • Understanding of the IP whitelisting process for Rivery's IPs on the Database Firewall, especially for EU server configurations.

Configure MariaDB for Rivery

Create a User for Rivery

To extract data, it's necessary to create a new user in the MariaDB database for Rivery. Follow these steps:

For MariaDB versions <= 8.0.3:

CREATE USER '<RiveryUsername>'@'%' IDENTIFIED BY '<password>';

For MariaDB versions >= 8.0.4:

CREATE USER '<RiveryUsername>'@'localhost' IDENTIFIED WITH mariadb_native_password BY '<password>';

Grant Privileges

Grant the following privileges to the created username in the MariaDB Database:

GRANT SELECT, SHOW DATABASES, SHOW VIEW, EXECUTE ON *.* TO '<RiveryUsername>';

Open Rivery IPs in MariaDB Database Firewall

To establish a successful connection, open Rivery IPs in the MariaDB server firewall. Open the IPs for the desired MariaDB port or SSH tunnel ports.

Establishing a Connection

Follow these steps to establish a connection to MariaDB in Rivery:

  1. Whitelist our IPs.
  2. Choose your Connection Name.
  3. Enter Host.
  4. Fill in the Port Number.
  5. Enter your Username and Password.
  6. Use the Test Connection function to see if your connection is up to the task.
    If the connection succeeded, you can now use this connection in Rivery.

image.png

SSL Options

In addition to providing basic credentials, users can connect to MariaDB using an SSL pem file. Follow these steps to configure SSL options:

  1. In the MariaDB Connection form, locate the SSL section.
  2. Upload the SSL pem file in the corresponding section.

SSH Tunneling

For enhanced security and flexibility, Rivery recommends using SSH tunneling when connecting to on-premise database servers. This section outlines the steps to configure SSH tunneling and integrate it into the Rivery Connection setup:

  1. Configure an SSH Tunnel server in your network capable of accepting SSH connections from Rivery IPs.
  2. Ensure the SSH server can connect to your database server using internal IP or address.
  3. Rivery will connect to the SSH server using a private key for authentication.

To connect via SSH Tunnel, follow our step-by-step tutorial.


Was this article helpful?