Quickstart Guide for Connector/C
MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases.The client library is LGPL licensed.
MariaDB Connector/C is distributed with MariaDB Server packages. Eventually, it will completely replace the functionality that has traditionally been performed by libmysqlclient in those packages. Currently, MariaDB Connector/C has replaced libmysqlclient as the client library for client utilities that are distributed with MariaDB Server. See MDEV-9055 for more information.
MariaDB Connector/C packages can be downloaded by selecting your desired version from the following page:
MariaDB Connector/C packages can also be downloaded by selecting C/C++ connector as the Product on the following page:
See the instructions below for information on how to install the MariaDB Connector/C package for your operating system.
To install MariaDB Connector/C on Windows, we distribute . The MSI installation process is fairly straightforward. Both 32-bit and 64-bit MSI packages are available.
MariaDB Connector/C is distributed in on Linux.
Since MariaDB Connector/C is now integrated with MariaDB Server, it can also be installed via a package manager on Linux. In order to do so, your system needs to be configured to install from one of the MariaDB repositories. The repository needs to be configured for or later.
You can configure your package manager to install it from MariaDB Corporation's MariaDB Package Repository by using the .
You can also configure your package manager to install it from MariaDB Foundation's MariaDB Repository by using the .
Installing with yum/dnf
On RHEL, CentOS, Fedora, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's
repository using or . Starting with RHEL 8 and Fedora 22, yum has been replaced by dnf, which is the next major version of yum. However, yum commands still work on many systems that use dnf. For example:
If you want to build applications with MariaDB Connector/C, then you will also need to install the development package. For example:
Installing with apt-get
On Debian, Ubuntu, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's repository using . For example:
If you want to build applications with MariaDB Connector/C, then you will also need to install the development package. For example:
Installing with zypper
On SLES, OpenSUSE, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's repository using .
For example:
If you want to build applications with MariaDB Connector/C, then you will also need to install the development package. For example:
See for information on how to build MariaDB Connector/C from source.
MariaDB Connector/C has exactly the same API as the MySQL Connector/C for MySQL 5.5
The function reference is available at:
It is also downloadable in html format from
Just like MariaDB Server and libmysqlclient, MariaDB Connector/C can also read configuration options from client in .
See for more information.
double to string conversion for prepared statements doesn't work correctly
Connector 3.0.7 and below doesn't support the MySQL 8.0 default authentication protocol, . This protocol should be supported in Connector/C 3.0.8 and above.
If you find a bug, please report it via the on .
The source code is available at the on GitHub.
GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
For licensing questions, see the .
sudo yum install MariaDB-sharedsudo yum install MariaDB-develsudo apt-get install libmariadb3sudo apt-get install libmariadb-devsudo zypper install MariaDB-sharedsudo zypper install MariaDB-devel