1

I plan to develop and sell a commercial, closed source application and I want to use MySQL to store data.

The application will be written in C++ and the MySQL server will be installed on end user's computer from official MySQL Website.

I also plan to use the MySQL Connector (which will be linked dynamically) on my application so it can store and retrieve data from the MySQL server.

The question is: can I use the Community version of MySQL which is under the GPL License, as long as I don't modify any of its code and the server is downloaded by the client, or do I still need the Commercial License?

Thanks in advance.

1

If you're linking in the MySQL libraries, well, that's linking as far as the GPL is concerned and you've created a derived work. See this question for example.

If you link to a GPL lib then you have created a derived work and your code must be GPL - this is different to LGPL code which specifically allows dynamic linking of differently licensed code. The system libraries including libc, are all LGPL.

Or here which quotes from the GPL FAQ

Linking [name of your program] statically or dynamically with other modules is making a combined work based on [name of your program]. Thus, the terms and conditions of the GNU General Public License cover the whole combination

In addition, see the Oracle MySQL licensing page, where this very issue is discussed:

A: Oracle makes its MySQL database server and MySQL Client Libraries available under both the GPL and a commercial license. As a result, developers who use or distribute open source applications under the GPL can use the GPL-licensed MySQL software, and OEMs, ISVs and VARs that do not want to combine or distribute the MySQL software with their own commercial software under a GPL license can purchase a commercial license.

So if you can find a BSD-licensed MySQL driver library, you can use it, but if you're using the libraries that MySQL provides, you either have to pay Oracle, or GPL your code.

  • Thanks for your reply. Earlier I had an another idea: what if I don't distribute the MySQL server with the application, but the end user have to download it by their own? What I want is to just store data in the server and not have it as a "feature" of my application or distribute it with it. Both applications will be independed from each other and not linked in any way, but my application will communicate with the running MySQL server. What about this? Thanks. – Konstantinos Kamaropoulos Nov 6 '15 at 17:38
  • 1
    I think I found the answer: soci.sourceforge.net – Konstantinos Kamaropoulos Nov 6 '15 at 22:46
  • 1
    Hmm... Well, that could be downloaded by the client. But that way the Connector won't be used directly by the application but by the library which is itself open source and connected to my application dynamically (if I compile it as DLL), so even the SOCI isn't a part of the application (not static connection). – Konstantinos Kamaropoulos Nov 7 '15 at 9:38
  • 1
    As always check with your lawyer, but dynamically linking to a library seems to create a derived work as quote above. – dsolimano Nov 7 '15 at 21:13
  • 1
    After so much time thinking about licenses, I got tired of it and decided not to use MySQL at all... I will use PostgreSQL which is free for commercial use. Thank you for you time :) – Konstantinos Kamaropoulos Nov 7 '15 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.