This is the implementation of the MariaDB data handler for MindsDB.

MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License. MariaDB is intended to maintain high compatibility with MySQL, library binary parity and exact matching with MySQL APIs and commands, allowing it in many cases to function as a replacement for MySQL.

Prerequisites

Before proceeding, ensure the following prerequisites are met:

  1. Install MindsDB locally via Docker or use MindsDB Cloud.
  2. To connect MariaDB to MindsDB, install the required dependencies following this instruction.
  3. Install or ensure access to MariaDB.

Implementation

This handler is implemented using mysql-connector, a self-contained Python driver for communicating with MariaDB servers.

  • Connecting using URL

  • Connecting using paramaters

Connect MariaDB to MindsDB by providing the URL parameter. Learn more here.

Usage

In order to make use of this handler and connect to the MariaDB database in MindsDB, the following syntax can be used:

  • Connecting using URL

  • Connecting using paramaters

CREATE DATABASE maria_datasource
WITH
  ENGINE = 'mariadb',
  PARAMETERS = {
    "url": "mysql://user@127.0.0.1:3306"
  };

You can use this established connection to query your table as follows.

SELECT *
FROM maria_datasource.example_table;