Linking with proprietary software ?

I am the manager of a team willing to use a MySQL/MariaDB database through C mysql/maria clients library.

I would prefer to use MariaDB because of the Oracle OPA, but is there a LGPL client available ? What can I do ?


If you link your application with the MySQL GPL client library and distribute it with your application, your application must also be distributed as GPL.

If you want to add optional support for MariaDB or MySQL to your application and not be bound by the GPL, you must use a non-gpl client library or access MariaDB / MySQL trough a generic framework, like ODBC or perl DBD.

There are currently two non-gpl clients you can use:

The MySQL 3.23 LGPL client; This should work with all MySQL and MariaDB versions, as long as you run MariaDB / MySQL with the --old-password option.

To make things easy for you we took the MySQL 3.23.58 source and extracted the the libmysql code from it to make it easy to build. You can find the libmysql 3.23.50 LGPL client library on our download page. This is not yet a perfect solution but a good starting point for something better. Please read the included README file to know the limitations of this library!

The other option is to use Drizzle's BSD client library which works with Drizzle, MariaDB and MySQL.

The main disadvantage of both of the above is that you need to recompile your application version to use either these and prepared statements will not work with them.

We at Monty Program Ab are trying to get funding to (or find people interested in helping us) create a new client library that will be BSD or LGPL and that will work as a true binary drop in replacement for the current MySQL client library.

It's still not decided if we will recreate this from scratch or use one of the above solutions as a base for this.

If you are interest in this, you can contact us either at maria-developers(at) or sales(at)


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.