开发者

Non-GPL library that can connect to a MySQL database?

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开发者_JS百科).

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


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:

  • Use the old version (i.e. LGPL) of the MySQL connector: https://mariadb.com/kb/en/mariadb/lgpl-mysql-client-library-32358/
  • Use the MariaDB connector (a fork of the old LGPL MySQL connector): https://mariadb.com/kb/en/mariadb/mariadb-connector-c/
  • Use Qt's database drivers (which are LGPL and have connectors for databases): http://doc.qt.io/qt-4.8/sql-driver.html
  • Use Libdrizzle: https://launchpad.net/libdrizzle


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜