Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

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

like image 484
jlstrecker Avatar asked Mar 30 '11 20:03

jlstrecker


People also ask

How do I connect to a MySQL database?

To Connect to a MySQL Database Expand the Drivers node from the Database Explorer. Right-click the MySQL (Connector/J driver) and choose Connect Using.... The New Database Connection dialog box is displayed. In the Basic Setting tab, enter the Database's URL <HOST>:<PORT>/<DB> in the corresponding text field.

How do I connect to a local MySQL server?

Step 3: Connect to a Local MySQL ServerEnter mysql.exe -uroot -p , and MySQL will launch using the root user. MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you'll connect to the MySQL server.

Is MySQL connector a library?

What is MYSQL Connector/Python? MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2. 0 (PEP 249). It is written in pure Python and does not have any dependencies except for the Python Standard Library.


2 Answers

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
like image 161
Claudio Avatar answered Nov 03 '22 01:11

Claudio


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.

like image 22
smokris Avatar answered Nov 03 '22 00:11

smokris