MariaDB Connector/C

C developers can connect to MariaDB Platform X4 through a native MariaDB Connector Using MariaDB Connector/C, you can connect to MariaDB Platform to use and administer databases from within your C application.

Installation

MariaDB Connector/C is available in the development files for MariaDB Enterprise Server. You can install it using your distribution's package manager or download the binaries.

Install via YUM (RHEL/CentOS)

To install MariaDB Connector/C on RHEL and CentOS, you can use YUM. First, you must configure MariaDB Corporation's YUM repository, if you have not already done so.

Retrieve your Customer Download Token at https://customers.mariadb.com/downloads/token/ and substitute for customer_download_token in the following directions.

Installable versions of MariaDB Enterprise Server are 10.4, 10.3, and 10.2. Pass the version to install using the --mariadb-server-version flag to mariadb_es_repo_setup. The following directions reference 10.4. All versions of MariaDB Enterprise Server contain the same version of MariaDB Connector/C.

To configure YUM package repositories:

$ sudo yum install wget

$ wget https://dlm.mariadb.com/enterprise-release-helpers/mariadb_es_repo_setup

$ echo "fc429a488e372c0d714c705b1dceb245904bcba8e76516fc8504f7e57d3530fd  mariadb_es_repo_setup" \
    | sha256sum -c -

$ chmod +x mariadb_es_repo_setup

$ sudo ./mariadb_es_repo_setup --token="customer_download_token" --apply \
   --mariadb-server-version="10.4"

To install MariaDB Connector/C and package dependencies:

$ sudo yum install MariaDB-shared MariaDB-devel

Install via APT (Debian/Ubuntu)

To install MariaDB Connector/C on Debian and Ubuntu, you can use APT. First, you must configure MariaDB Corporation's APT repository, if you have not already done so.

Retrieve your Customer Download Token at https://customers.mariadb.com/downloads/token/ and substitute for customer_download_token in the following directions.

Installable versions of MariaDB Enterprise Server are 10.4, 10.3, and 10.2. Pass the version to install using the --mariadb-server-version flag to mariadb_es_repo_setup. The following directions reference 10.4. All versions of MariaDB Enterprise Server contain the same version of MariaDB Connector/C.

To configure APT package repositories:

$ sudo apt install wget

$ wget https://dlm.mariadb.com/enterprise-release-helpers/mariadb_es_repo_setup

$ echo "fc429a488e372c0d714c705b1dceb245904bcba8e76516fc8504f7e57d3530fd  mariadb_es_repo_setup" \
    | sha256sum -c -

$ chmod +x mariadb_es_repo_setup

$ sudo ./mariadb_es_repo_setup --token="customer_download_token" --apply \
   --mariadb-server-version="10.4"

$ sudo apt update

To install MariaDB Connector/C and package dependencies:

$ sudo apt install libmariadb3 libmariadb-dev

Install via ZYpp (SLES)

To install MariaDB Connector/C on SLES, you can use ZYpp. First, you must configure MariaDB Corporation's ZYpp repository, if you have not already done so.

Retrieve your Customer Download Token at https://customers.mariadb.com/downloads/token/ and substitute for customer_download_token in the following directions.

Installable versions of MariaDB Enterprise Server are 10.4, 10.3, and 10.2. Pass the version to install using the --mariadb-server-version flag to mariadb_es_repo_setup. The following directions reference 10.4. All versions of MariaDB Enterprise Server contain the same version of MariaDB Connector/C.

To configure ZYpp package repositories:

$ sudo zypper install wget

$ wget https://dlm.mariadb.com/enterprise-release-helpers/mariadb_es_repo_setup

$ echo "fc429a488e372c0d714c705b1dceb245904bcba8e76516fc8504f7e57d3530fd  mariadb_es_repo_setup" \
    | sha256sum -c -

$ chmod +x mariadb_es_repo_setup

$ sudo ./mariadb_es_repo_setup --token="customer_download_token" --apply \
   --mariadb-server-version="10.4"

To install MariaDB Connector/C and package dependencies:

$ sudo zypper install MariaDB-shared MariaDB-devel

Install via Download

To install MariaDB Connector/C on other distributions or operating systems, binary tar files are available at:

https://mariadb.com/downloads/#connectors

Select the MariaDB Connector, version, and operating system, then download the .tar.gz file.