I had developed a Java application which is connected to MySQL Workbench by using mysql-connector-java-8.0.21.jar file. When I deploy the project and send source code to the client he says that:

  1. The license must not have a licensed GNU/ GPL / Unspecified that has a disclosure obligation (it is okay to have MIT / BSD / Apache without a disclosure obligation)
  2. Change the GNU/GPL licence to MIT or BSD

Now my question is, how to change the licence of the project or how to change the licence of library files like Mysql connector.jar.

Because I need a open source licence for the source code, So I need to change the licence libraries (used in project).

  • 1
    You need to ask a lawyer, not random coders on the internet. – Federico klez Culloca Nov 20 '20 at 10:13
  • 4
    You cannot change the license of 3rd party libraries, unless they themselves offer compilations with different licenses. One example of this would be ffmpeg. What you are trying to do is to circumvent GPL, which won't work. Further reading: stackoverflow.com/questions/1766205/… – Koenigsberg Nov 20 '20 at 10:22
  • 5
    Could you clarify what exactly you mean by "disclosure obligation" in this question? – David Z Nov 20 '20 at 19:43
  • Does your application have a compile-time dependency on that actual connector jar? In nearly all cases, the compile-time dependency can be reduced to the JDBC interface. – chrylis -cautiouslyoptimistic- Nov 21 '20 at 6:03
  • 2
    You probably want to look at this: stackoverflow.com/questions/5491691/… You have to replace the mysql-connector with a different non-GPL library. – Bakuriu Nov 21 '20 at 10:20

You cannot change the license of code from others, such as mysql-connector-java. That license is set by the author of that particular component (Oracle company).

If your client stated the requirement up front, you have a problem. But otherwise you can just decline the request, and state that this is outside your control.

P.S. The use of the term "disclosure obligation" in this context suggests that the client does not understand the law. But if the client specifically named the GPL as an example of banned licenses before agreeing on the contract, then the misuse of the term "disclosure obligation" does not invalidate the contract.

  • Okay, So can I remove all the license that are subject to disclosure obligation such as GNU ? – Atif Rizwan Nov 20 '20 at 17:04
  • 10
    @AtifRizwan not unless you also remove all the code that is licensed under GPL. – Dan Is Fiddling By Firelight Nov 20 '20 at 19:11
  • 4
    The GPL does contain something that could be described as a "disclosure obligation". In particular, it effectively forbids sale (or other distribution) of compiled programs derived (fully or in part) from GPL source code unless the entire source code for those programs is made available to the buyers (or recipients). While this is not the aspect of the GPL that proprietary software vendors tend to find the most objectionable (usually that's the fact that the GPL also requires granting the buyers the right to copy and redistribute the software), it is one of the core features of the license. – Ilmari Karonen Nov 20 '20 at 21:21
  • 3
    @IlmariKaronen: Fair point. This question is already the first Google hit for "GPL disclosure obligation", which suggests the unusual interpretation, but I can see the argument. – MSalters Nov 21 '20 at 18:59

mysql-connector/j is licensed as GPLv2 by Oracle but has a FOSS Exception. If you want to distribute your software as FOSS, you can choose any license "that is OSI-approved and/or categorized by the FSF as free". Otherwise you must use a different library or buy a commercial license from Oracle.

And you cannot change the license of mysql-connector/j since you are not the owner of its copyright (Oracle is).

  • 3
    I can't speak for that library specifically, but there is one way you can "change the license". If it was only written by one or two people you can offer to pay them a large amount of money, in exchange for them granting a second license under your terms. – Patrick M Nov 20 '20 at 22:04
  • 3
    1. The fact a library is under the GPL doesn't necessarily mean a java program using it must use that license too. Have a look to the classpath exception or universal foss exception. 2. Oracle already dual license mysql. – jlliagre Nov 21 '20 at 14:31
  • @jlliagre None of these apply for the connector, which is GPLv2 without exceptions. – Martin Schröder Nov 21 '20 at 17:18
  • 1
    You should have a closer look to its license file. – jlliagre Nov 21 '20 at 17:49

There are multiple license styles at play here;

  • MIT/BSD/Apache-style license style
  • GPL
  • LGPL
  • Commercial

MySQL connector, assuming you mean MySQL Connector/J, is dual-licensed; You can either choose the commercial license (you will have to pay for this), or the LGPL license. Licensing is a thing the authors of a product do; you can't change the license. If the task at hand demands a certain license, you ask the authors if they offer it, and how much you need to pay to get this; if it's too much for your wallet or this license is not available, your only resort at that point is to either change the requirements, or, remove that product from your codebase entirely, and e.g. switch to PostgreSQL (a different DB engine), for example.

Note that LGPL isn't the same as GPL. It's more like MIT/BSD/Apache-style licenses than GPL is, so one way out may simply be to ask your client's lawyers if LGPL is acceptable.

For future consideration, always check with the client what kind of license restrictions they have. For example, if MIT/BSD/Apache is the only way, then you cannot use MySQL here. Period. MySQL is not licensed like that and Oracle (the owner of MySQL) doesn't offer it. In that case, it's possible a commercial license would have sufficed (so, make sure to charge the client to take into account you'll need to acquire a commercial license). Alternatively, take into account that you'll need to spend some time learning about using different tools (such as PostgreSQL, whose license is MIT/BSD/Apache-style), and bill accordingly.

If you need more information about whether or not the LGPL of MySQL and MySQL Connector/J is compatible with your client's needs, or what's going to happen if you ignore either a license or your customer's written requirements, you should ask a lawyer.


According to https://www.mysql.com/about/legal/licensing/oem/, you are free to use any approved open source license for your code even if it is using the GPL'd MySQL library.

The license used by recent versions of mysql-connector-java is described here: https://oss.oracle.com/licenses/universal-foss-exception/

Here is an excerpt of the LICENSE file provided with the connector package (emphasis mine):

Licensing Information User Manual

MySQL Connector/J 8.0 __________________________________________________________________

This License Information User Manual contains Oracle's product license and other licensing information, including licensing information for third-party software which may be included in this distribution of MySQL Connector/J 8.0. Introduction Last updated: August 2020

Licensing Information

This is a release of MySQL Connector/J 8.0, brought to you by the MySQL team at Oracle. This software is released under version 2 of the GNU General Public License (GPLv2), as set forth below, with the following additional permissions:

This distribution of MySQL Connector/J 8.0 is distributed with certain software that is licensed under separate terms, as designated in a particular file or component or in the license documentation. Without limiting your rights under the GPLv2, the authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have included with the program.

Without limiting the foregoing grant of rights under the GPLv2 and additional permission as to separately licensed software, this Connector is also subject to the Universal FOSS Exception, version 1.0, a copy of which is reproduced below and can also be found along with its FAQ at http://oss.oracle.com/licenses/universal-foss-exception.

Purchasing a MySQL commercial license is an alternative. It will allow you to use a proprietary license for you own code and so be free to keep it unpublished.

Of course, as you do not own MySql code and libraries, you have no right to change its own license.

Disclaimer: I'm not a lawyer and this is not legal advice; I do not claim that the above is accurate; don't make any business decisions based on stuff you read from strangers on the Internet, including me

  • 2
    I believe OP is not developing a FOSS software (I guess because they talk about a "client" and foss usually isn't commission based), so the foss exception probably doesn't apply. – Bakuriu Nov 21 '20 at 10:23
  • 3
    @Bakuriu Nothing prevents to sell FOSS software, not even the GPL and the OP stated MIT / BSD / Apache without a disclosure obligation is okay. The OP is also sending the project source code to the client which isn't typical for closed source apps. Moreover, if the OP is distributing proprietary software with MySql libs, then he must already have a commercial license to do so. – jlliagre Nov 21 '20 at 10:53
  • 2
    I believe OP is working for hire for a client. The client does not want GPL or copyleft licenses because they do not want their customer having the sources. Therefore the software isn't FOSS. – Bakuriu Nov 21 '20 at 16:25
  • @Bakuriu That would contradict the OP question that states MIT/BSD/apache is fine for the project. – jlliagre Nov 21 '20 at 17:53
  • @Bakuriu: When you're developing software for one client, FOSS can in fact be be a major cost saving. I've done so for a retail shop's point-of-sales terminals. They didn't care at all that they got GPL rights. – MSalters Nov 21 '20 at 19:09

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.