We have created a web application hosted on virtual machine for client access through web only, no distribution . The database we have used is MySQL Community Edition under GPL 2. The application is connected to MySQL though MySQL Java connector. Are there any impediments in this case considering GPL 2.

1 Answer 1


The use of a MySQL database server has no effect on your software. The GPL only extends to derivative works of the GPL-covered software. Most likely, just communicating with a separate process is not enough to create a derivative work.

However, the use of a GPL-covered library in your application means that your application would be subject to the GPL as well. You do not have to publish your software, so this is typically not a problem for server-side software. However, if you give anyone else a copy of the software then you can only do so under the terms of the GPL.

If this is a problem for you, you could look for an alternative MySQL client library, or put the code that communicates with MySQL into a program that is clearly separate and independent of your main code, e.g. a kind of storage microservice. Or you could buy a commercial license, which seems to be the point of keeping the official Java connector under the GPL.

An even better solution might be to look at MariaDB (a highly compatible fork of MySQL after Oracle acquired MySQL). The MariaDB connector is available under the LGPL license, which imposes no license requirements on you as long as you keep the connector in a separate JAR. The MariaDB connector might still be compatible with a MySQL server, but of course this is not guaranteed.

  • 1
    It is not axiomatic that cross-process communication doesn't create a derivative work. Commented May 16, 2023 at 18:24
  • @user253751 full agreement, which is why I qualified that statement as "most likely". The FSF analysis on this aspect suggests that communication should be "at arms length", but I would generally expect this to be the case for a database wire protocol.
    – amon
    Commented May 18, 2023 at 10:49
  • maybe for a generic protocol, but it's not obvious that communicating with a MySQL server using the MySQL protocol and MySQL command syntax doesn't make your program a derivative of MySQL Commented May 19, 2023 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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