To clarify once for all the usage of GPL v2 applications without modifying the binary of GPL licensed program and only using it (making queries). My case is the following:

I want to install MySQL Community edition via msi installer downloaded from the official MySQL website. After installing it I want to create a db and use it. Should I open source code of my quires and upload them for example in GitHub with the relevant copyleft notice or I can use the installed MySQL server without any concern about opening my source code for the quires?

I was on a db course where I've installed the aforementioned Server and use it until the end of my course without putting my queries in public repository with copyleft note. Did I violate the GPL v2 in this case?

Now I want to make the same in my enterprise company where I want to use the MySQL server in the same way. So can I use it without opening my source code and putting copyleft note to my quires?

My feeling is that I can do it without opening the source code of my quires according to the following links:

  1. Can I use a GPL component in my site without having to disclose the sources of my site?

With highlighting the following cite:

If you are calling a separate executable where that executable is subject to the GPL, you are very likely not creating a derived work.
  1. When Are You Required to Have a Commercial MySQL License?

Stated as I understood that I can use MySQL Server in the use case I want.

GPL version 2 link.

In this document I can't see some statement that prohibits the way that I want the MySQL server. No mater that it's used in enterprise company or in a home computer (for the purposes of my usage).

2 Answers 2


The GPL (and all open source software licenses) only covers copying, distribution, and modification of the software. In general, if you have a legally obtained copy of some piece of software installed on your computer, you as the operator of the computer have the right to use that software in any way. If you think about it for a moment, this is similar to any other non-software product that you may obtain (either for a price or gratis). For example, if you have in your possession a legally obtained kitchen knife (obtained for a price or gratis), then you also have a right to use that knife in absolutely any way. Indeed, you may even use it to perform an unthinkable action, such as to injure a person or animal. Depending on the details of such an action (was it intentional or incidental, etc.), by such a usage of your knife you have possibly broken one or more laws. But there is no need or benefit for a license on the knife to say "by purchasing or using the Deluxe Kitchen Knife (hereafter 'Knife') you agree not to injure any person or animal using the Knife."

The GPL even says so explicitly at the beginning. Of course, the GPL has no need to actually say this in order to give you this right, but the drafters of the GPL decided to say it anyway:

The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program).

GPL version 2.

When do I need a license?

In general, you need a license in order to copy, modify, or distribute a piece of software. The reason for this is that these activities are normally protected by copyright law, so that's the reason you need a license (permission) to do them. If you aren't copying, modifying, or distributing the software, you have no need for a license of any kind. However, if you don't have a license, or if you were given a license but decided not to accept it (e.g. by not following its terms), but then you decide to go on to copy, modify, or distribute the software anyway, then you have possibly (depending on the details, of course) violated copyright law. That's essentially the only reason that you need the license.

If you are not going to copy, modify, or distribute software (or any other copyrighted work), you have absolutely no need for a license. This is the same as if you go to a library, take a book off the shelf, and sit down to read it. Do you need a license to read that book? What if the author wrote on the first page "This is a book about vegetarianism. By reading this book, the reader (hereafter 'You') hereby agree that You will renounce the practice of eating meat and fish and that You will eat only non-animal products hereafter." Do you need to accept this 'license' in order to read the book? No.

Note however that in practice, installing a piece of software very often involves some form of copying, such as downloading from the Internet, copying from some external media like a DVD, and so on. So it often seems like in practice you will need a license to use it, because in order to use it, you need to install it, and in order to install it, you need to perform some sort of copying. However, it is the copying that is actually permitted by the license, not the act of running the program or using it in some particular way.

I've installed the aforementioned Server and [used it] without putting my queries in public repository with copyleft note. Did I violate the GPL v2 in this case?

No. This is the normal use of the software, and you are not copying, modifying, or redistributing the software by writing queries into it. The same argument holds true no matter in what situation you use it. You could use at home, at school, as part of a non-profit organisation, as part of a for-profit organisation, as part of a military organisation, as part of a terrorist organisation, and so on. The actual actions that you perform in such an organisation is what distinguishes legal and proper behaviour from illegal or improper behaviour.

  • re "copy, modify, or distribute"; Isn't it just distribution though?
    – Pacerier
    Jun 1, 2020 at 11:41
  • No, the example is not distribution. The OP downloaded an open source program and then used it to create queries and save them as SQL files. The SQL files belong to him completely (i.e. he can distribute them); that's because those SQL files are not a derivative work of the program. It would be like installing Microsoft Word on your computer and then using Word to create .docx files. Those .docx files are yours; you do not need to agree to a Microsoft license to distribute your own creations, even if you used a Microsoft product to create it.
    – Brandin
    Jun 2, 2020 at 11:02

GPL saids that if there is 2 programs linked (this is term when I join 2 programs in C), and one is covered by the GPL license, then it is a derivated work, and it must be covered by the GPL license, then it must not be commercial.

Historically there were 2 examples that this simple formula was not clear:

1) Two programs in Java. In this case the Java programs never has been linkaged because it has different technology, but the formula is simple, if the two programs run in the same JVM then they are "virtual linkaged", the derivated work must be covered by GPL. If they run in different JVM, or in other proccess or in other machine, they are independents work, and you can use it in commercial programs.

2) MySQL. Historically, Sun Microsystem always fought because MySQL could not be used in commercial projects, and they were right. But why, if my commercial program runs in a different machine that the database? Because of the client library, the driver to connect to the database in the client was covered by the GPL and this library runs in the same proccess or JVM of my program, then my program must be covered by GPL. But not anymore, because there are currently many client libraries to connect to MySQL that are not covered by GPL (do not use the oracle drivers, use MariaDB).

You can use open source programs if you do not distribute the program (internal use. Or in a Web Server except with APL license), in diferent process or JVM (when you use the GPL program with a command line instruction, or communication via), it runs in another computer, or if the open source license is Apache, MIT, BSD, Common Public, etc.


This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .