views:

835

answers:

8

As far as I know, when I build a desktop/server app using any GPL code like MySQL I will have to release the source code of my software under the GPL.

If I want to develop a web-app using MySQL, my code will link against the MySQL libraries. Must I release the sourcecode of my webapp in this situation to be in accordance with the GPL?

+4  A: 

You must either release the source (under GPL), or pay for a proprietary license to MySQL so that you gain the right to distribute the MySQL binaries under a license that is more amenable to that which proprietary products use. It's best to take this type of question to your lawyer, though.

ETA: Just to clarify a little bit; if you write your own library which talks to MySQL using its wire-line protocol, then you'll always be 100% in the clear. Likewise, if you use a library that has done just that, but is BSD licensed (as an example), then you'd also be in the clear, because you're only talking to MySQL over a socket connection, and not actually calling into GPL'd code. I am not immediately aware of any BSD licensed interfaces to the MySQL protocol, but it's certainly possible that there is one out there somewhere.

Michael Trausch
+1  A: 

Unless you derive from and/or distribute the GPL'd software, you should be safe.

Linking against the MySQL client library is neither a derivative work, nor distribution.

UPDATE: Come to think about it, how you link (dynamic or static) against the libraries will make a difference. Static linking is distribution, but if you link dynamically and your clients download the connectors themselves, that's not distribution and you should be safe.

Oh, and IANAL.

Can Berk Güder
GPL is not LGPL. There is a *major* difference. LGPL can be linked with proprietary software, GPL can not.
Michael Trausch
I know the difference. But as long as you don't modify and/or distribute the GPL'd software, there's little difference.
Can Berk Güder
Right, but the key point is distribution, not whether it's a derived work or not. That's all.
Michael Trausch
I edited my answer, I hope it makes more sense now. I'm not 100% sure it's correct, though.
Can Berk Güder
Dynamic linking has been a sticking point. The answer there tends to be dependent on the project; e.g., linking dynamically into the Linux kernel is permitted by Linux devs (though frowned upon), but they don't have to be so kind.
Michael Trausch
I see. Thanks for the information. =)
Can Berk Güder
+1  A: 

MySQL uses dual licensing. As they put it - if you're free, we're free.

So, if you use, as far as I know, MySQL JDBC Connector only - you should have license or GPL your code.

emirc
+1  A: 

If you're running the web application yourself, and not distributing it as an application, then you don't have to release the source. Allowing access to a web application is not considered distribution.

Edit: if interested you might look at the Affero General Public License, which requires that source be made available to network users of AGPL software (e.g. it would apply to web applications).

Boden
If you link against a GPL lib and distribute, you do. If you keep it internal, you do not. There are fine lines (shipping code to client-side for execution, etc.) which lawyers have to argue about, though.
Michael Trausch
@Michael Trausch Removed that line based on your input, thanks.
Boden
A: 

First, I am not a lawyer. Talk with one before taking any advice here.

Beyond that, if you do not distribute your web app, you likely do not need to release your changes. You can still make your web app available to be used by others if you host the web app.

Scott Bevington
+9  A: 

Provided that you keep it server-only(and therefore "private"), you don't have to release it as GPL. But as soon as it reaches public desktops, it can no longer be considered an internal build, and therefore source code is needed.

So you can:

  • Release your code as GPL
  • Buy the commercial version of MySQL
  • Keep it server-only.
luiscubal
A: 

If your distribution includes and installs MySql in the same package, it requires a commercial license.

But if you only distribute your code, with a mere "requires MySql" notice and an installation script (to create/populate the tables), there should be no problem, AFAIK.

IANAL, of course.

A: 

If I want to develop a web-app using MySQL, my code will link against the MySQL libraries. Should I release the sourcecode of my webapp in this situation to be in accordance with the GPL?

  1. As others have said, if you're not distributing the app to others there is no issue at all.

  2. Normally, you would develop against a standard database API and let the user decide what database to connect to the app. In this case there is no issue. “Your code” wouldn't be linking to libmysqlclient, but it could potentially be combined with a database access module that does link to libmysqlclient.

  3. If you want to distribute an installer that sets up your application and libmysqlclient together, that probably wouldn't count as “mere aggregation”, so it would require you to distribute your app under an open source licence. This needn't, however, necessarily be GPL — see the MySQL FOSS License Exception.

  4. If you want to distribute an installer that sets up your application and the MySQL server itself, the Exception does not apply, so you are limited to GPL only.

Naturally IANAL, and there is certainly still some uncertainty about what counts as derivation especially with regard to dynamic linking. However the above is my understanding of MySQL AB's traditional position on licensing, and I've not heard of any change post-Sun-takeover.

bobince