MySQL licensing and GPL
Solution 1
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.
Solution 2
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.
Solution 3
You don't necessarily have to link against MySQL libraries in order to use MySQL in your application. All you have to do is to "speak" to a MySQL server using the MySQL protocol; in which case, you are connecting to the MySQL server as a client, i.e. as a user, and then you don't need to release your software under the GNU GPL license.
The question is, how can your program speak the MySQL protocol? One possibility is using the official MySQL client library (connector), which is GPL'd. If you do this, you are statically linking your program to a GPL'd library, and thus you need to release your software under the GPL.
Alternatively, you can link against a third party client library, with a different license. For example you can use the MariaDB Client Library, which is LGPL'd (and is thus compatible with proprietary software) and provides the same API of the original MySQL client library. See the MariaDB licensing FAQ, which also applies to MySQL, for more details and advice.
It may be tricky to distribute the MySQL server along with your software: you could simply require your customers to download and install MySQL by their own, or develop a simple downloader to be distributed with your software.
Solution 4
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).
Solution 5
Unfortunately, it is not nearly so clean cut: The GPL prohibits distribution without giving the source of every "derived product". Distribution is legally defined as the act of transferring source from one computer to one or more computers for official use.
Unfortunately, that can also include use on server clusters, QA boxes, dev boxes, etc. In the modern dev shop, just releasing the code to multiple frontend/backend boxes is technically distribution (in the eyes of the law).
It doesn't matter what the Free Software Foundation thinks, it matters what a few judges think once someone/a corporation is sued for doing exactly that.
That's just one more reason why the GPL's primary customers these days are corporations who wish to keep competitors from forking their code. Everyone else should consider far less encumbering licenses like the MIT or Creative Commons Attribution licenses.
Related videos on Youtube
George
Updated on June 11, 2020Comments
-
George almost 4 years
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?
-
MrTux over 9 yearsYou could also consider using MariaDB which is licensed unter the LGPL and the protocol is binary compatible with MySQL.
-
JasonMArcher almost 9 yearsI'm voting to close this question as off-topic because it is about licensing or legal issues, not programming or software development. See here for details, and the help center for more.
-
-
Rambo223 about 15 yearsGPL is not LGPL. There is a major difference. LGPL can be linked with proprietary software, GPL can not.
-
Rambo223 about 15 yearsIf 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.
-
Can Berk Güder about 15 yearsI know the difference. But as long as you don't modify and/or distribute the GPL'd software, there's little difference.
-
Boden about 15 years@Michael Trausch Removed that line based on your input, thanks.
-
Rambo223 about 15 yearsRight, but the key point is distribution, not whether it's a derived work or not. That's all.
-
Can Berk Güder about 15 yearsI edited my answer, I hope it makes more sense now. I'm not 100% sure it's correct, though.
-
Rambo223 about 15 yearsDynamic 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.
-
Theodore R. Smith over 11 yearsUnfortunately, it is not nearly so clean cut: The GPL prohibits distribution without giving the source of every "derived product". This affects almost every web app... see my answer below.
-
luiscubal over 11 years@TheodoreR.Smith Indeed, I suspect that when we add content delivery networks, thing might get ugly. I wonder if this has ever been tested in court.
-
Theodore R. Smith over 11 yearsOh it has never been tested in court. All of the big players would get royally screwed, as they all distribute GPL over their internal servers. If it ever went to court and clusters counted as distribution, then the GPL market would seize up and die almost immediately.
-
Umair Aziz about 10 years@bobience can you please, provide some reference to your above mentioned clarification about mysql GPL licensing. MySQL didn't explain clearly on their licensing web links
-
Jason Rice about 10 yearsYou have to provide source code to whomever you distribute to with the GPL. It doesn't necessarily mean you have to make it publicly available to everyone. It is a non issue if you are distributing it on your own servers.
-
emerino over 9 yearsThis is kind of old, but according to this source websites shouldn't be affected by this, provided they use mysql client libraries with LGPL licenses openquery.com.au/blog/…
-
luiscubal over 9 years@emerino Dynamically linking to LGPL libraries should be OK. Statically linking to LGPL, as well as any form of linking to GPL libraries, will mean the application needs to be covered as well.
-
Jeff Learman almost 9 yearsThanks: MariaDB is working for me. Oddly,
DatabaseMetaData#getColumns("", "", tableName, "")
returned no columns, but that was easily recoded using a normal query withSHOW COLUMNS
. -
sav over 8 yearsWhat exactly is meant by "server-only"? How does a program connect to MySQL in this way?