← Back to team overview

maria-discuss team mailing list archive

Re: (/usr/include/mysql and libmysqlclient) vs (/usr/include/mariadb libmariadbclient and libmariadb)

 

Hi, james!

On Oct 03, james harvey wrote:
> First, let me clarify everything here is MariaDB - nothing actually
> involving the MySQL code.
> 
> In Arch Linux, I'm running a MariaDB server and client.  I installed
> the mariadb package, built from the source at:
> 
> http://ftp.heanet.ie/mirrors/mariadb/mariadb-10.1.18/source/mariadb-10.1.18.tar.gz
> 
> This provides:
> - /usr/include/mysql/* (141 .h files)
> - /usr/lib/libmysqlclient.so
> - /usr/lib/libmysqld.so  (I see this is for embedding a MariaDB server
> in an application which I don't need, so I'll ignore that for the rest
> of my message.)
> 
> I have C++ applications that will access MariaDB, and I thought I also
> needed mariadb-connector-c, so I built tag v2.3.1 at

No, you doesn't. See below

> https://github.com/MariaDB/mariadb-connector-c
> 
> This provides:
> - /usr/include/mariadb/* (40 .h files)
> - /usr/lib/mariadb/libmariadbclient.a
> - /usr/lib/mariadb/libmariadb.so
> 
> Q1 -
> 
> What's the purpose and difference between libmysqlclient,
> libmariadbclient, and libmariadb?  (Ignoring difference shared vs
> static library.)

libmariadbclient.a is a static version of libmariadb.so.
both are the MariaDB Connector/C - new LGPL MariaDB/MySQL client
library, see https://mariadb.com/kb/en/mariadb/mariadb-connector-c/

libmysqlclient is the old GPL MariaDB/MySQL client library. It's no
longer developed, all new features go into MariaDB Connector/C.
libmysqlclient is removed in 10.2

Either way, you need either libmysqlclient or libmariadb, you should not
link with both at the same time.

> I got very confused at this point why the same function is declared in
> each, why they're different, which I should be using, etc.

Use either one, but not both.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


References