5

I'm looking for a C, C++, or Objective-C library that can connect to a MySQL database. I'm aware of libmysqlclient (GPL) and SQLAPI++ (non-GPL).

Are there any alternatives besides SQLAPI++ that can be included in a non-GPL project?

jlstrecker
  • 4,953
  • 3
  • 46
  • 60

3 Answers3

4

The MySQL C connector used to be LGPL (thus, allowing dynamic linking to proprietary code). Oracle has changed the license from LGPL to GPL starting from versions later than 3.23.58.

To use a LGPL connector therefore you have the following options:

Claudio
  • 10,614
  • 4
  • 31
  • 71
1

Try SOCI or POCO. Both are under the Boost Software License.

EDIT: Indeed you are right. And it seems you're in a hot spot and would have to buy a MySQL license, at least according to the following

GPL and libmysqlclient

About MySQL++, GPL and LGPL

MySQL licensing and GPL

Community
  • 1
  • 1
celavek
  • 5,575
  • 6
  • 41
  • 69
1

iODBC is BSD-licensed, and provides an ODBC client implementation.

The user could then install the MySQL Connector/ODBC to interface with the MySQL server.

smokris
  • 11,740
  • 2
  • 39
  • 59