2

I am developing a native application which calls a PHP Script by using POST-requests. The PHP script interacts with a MySQL Community Server which is under the license GPL. It reads, inserts and deletes data from a MySQL database just on the server where it is installed and returns results to the native application.

Do I have to publish the PHP code for the web app which interacts with MySQL because of GPL? That would be a security risk because the whole database structure and access would be visible. Or do I not have to publish the code of the web app because it is not the part of the application that would be distributed?

The native application will be distributed (for free) but the whole project would not be open source.

1

The answer is complicated. If your PHP code was released under one of the open source licenses on the MySQL FOSS License Exception list, you would not need to release it under the GPL.

The FOSS License Exception permits use of the GPL-licensed MySQL Client Libraries with software applications licensed under certain other FOSS licenses without causing the entire derivative work to be subject to the GPL.

However, that is a problem since your project is not open source.

Here are similar questions that I researched:

This answer to the second question describes the situation well. It all depends on how you communicate with the MySQL server.

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.

1

No, if you are developing an application with a server in PHP+MySQL, you are normally not distributing the server part. Therefore, this is considered as private use and you don't have to release any of your server code. The client part is a different program altogether so isn't affected by MySQL license either.

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.