Licensing FAQ
In this article we will explain how the MariaDB and MySQL server and client library licenses affect other applications and what steps you can take to comply with the GPL or avoid having to change your applications to GPL.
In the following text we talk about MariaDB. The guidelines also apply to MySQL in general, at least up to 5.1.55 which is the latest stable release while writing.
Contents
Licenses used by MariaDB
MariaDB is distributed under the GPL license, version 2.
The MariaDB client library is also GPL version 2, but has a FLOSS exception that allows you to combine it with most other open source software, without conflicting with their license, even if that license is incompatible with the GPL.
MySQL before 5.1.55 also had the same FLOSS exception for the C client libraries, but the exception file and all references to it were removed by Oracle in MySQL 5.1.55.
The original MySQL client library was licensed under the LGPL, which allowed you to distribute the MySQL client library freely with any application.
Internal usage is free
The GPL license only affects code that you distribute to other parties.
Internal usage within an organization is totally free and not subject to any conditions. There is no such thing as 'internal distribution' that would restrict the usage of your code by requiring it to be GPLed.
Connecting to a remote service that runs MariaDB (or any other GPL software) in the background is also free.
For internal programs for which you own all the copyright(s), there is essentially no risk in using GPL software. The argument you can use in your defense is that if the software became GPL as part of the distribution, you as the copyright holder could immediately revert your part back to its original copyright. No one has the right to require you to reveal or redistribute your code to the outside of your organization even if you would have distributed it internally linked with GPL software!
If your lawyers are concerned about distributions of software linked with GPL libraries between different legal entities within your organization, you can solve this by distributing your components and the GPL software separately, and have your other entity combining them.
Distributing an application with a MariaDB connector/client
This section is for those that want to distribute the MariaDB client library code, but not the server, with their applictions.
Free software/open source applications
If your application is Free software/open source and uses one of the licenses listed in the FLOSS exception, the GPL in the client library does not affect your application.
Note that for doing this you need to use a client that has the FLOSS exception. This is either a MariaDB client or a MySQL client before 5.1.55.
Using a connector that is not GPL
If you are using a connector that is not GPL, you are only bound by the license of that connector. Some examples are:
The above have licenses that allow you to use them freely, without you being bound by the GPL.
Using a database source independent framework
If you are using a framework that allows you to connect dynamically to different RDBMS systems, any GPL licensed module loaded by the framework will not affect the application. Such frameworks are
- ODBC (Open Database Connectivity)
- JDBC (Java database connectivity)
- Perl
The reason the GPL in the MySQL client library would not affect your application in this case is that the GPL client is supporting a standard interface and is thus merely an optional component among many. Your application could just as easily use the framework to connect to a RDBMS other than MariaDB or MySQL.
Any software can be connected to the GPL v2 licensed MySQL Connector/ODBC, without the need for that software to be GPLed. This is because there is a piece of general management software, the ODBC manager, between the GPLed MySQL Connector/ODBC and your software. If any logic would require the software which interfaces with MySQL Connector/ODBC to be GPL, then that would apply also to the ODBC manager itself. Yet, the ODBC manager is not GPL, neither on Windows nor on Linux. By consequence, no one would be allowed to use MySQL ODBC driver for anything.
Using the MariaDB C client
If you are using the MariaDB C client and you are not covered by the FLOSS exception, then you have the following choices:
- Change your application to be GPL or to a GPL compatible license.
- Change your application to use one of the above mentioned free connectors or frameworks.
- Change to use the original LGPL MySQL client library
- Change to use the libdrizzle client library.
- Support the effort in progress to create a LGPL/BSD client library.
- Buy a license from Oracle for using the MySQL client library.
- Contact SkySQL sales for another version of the MySQL client library that is not GPL.
The above applies also to MySQL up to MySQL 5.1.54. If you are using MySQL 5.1.55 or above, you better read this.
Distributing a proprietary application with the MariaDB / MySQL server
When you are distributing your application together with MariaDB or MySQL you are bound (or can be seen to be bound by some lawyers) by the GPL if some of the following statements apply:
- You are using GPL code from MySQL linked directly to your application. (Like the MySQL GPL client library).
- Your application requires the MariaDB server to work and without the MariaDB server it doesn't start or it has very limited functionality.
The problem with the client library can be avoided by using one of the solutions mentioned earlier.
If your application works with many databases, either natively or by using one of the database source independent frameworks, then you can freely distribute the MariaDB server with your application without being affected by the GPL. The reason for this is that MariaDB would only be an optional, independent component in your software distribution and section 2 of the GPL explicitely allows this:
"In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License."
SkySQL provides another solution for using MySQL or MariaDB with your application without having to be bound by the GPL. For more information, contact [email protected].
You also have the option to buy licenses for MySQL from Oracle to get MySQL under other copyright terms. If you would like to later be able to use MariaDB instead of MySQL, please ensure that your license agreement allows you to make changes to the MySQL code! (This is something that you should ensure in all cases as otherwise you may run into bugs that Oracle will not fix, you are not allowed to fix and could make MySQL software unusable for you!)
The rights to use the MariaDB code changes in your application can be requested from Monty Program Ab.
MySQL 5.1.55 client license change
In MySQL 5.1.55 Oracle removed the EXCEPTIONS-CLIENT files, which contained the FLOSS exception from the MySQL source code trees and the distributions. They also removed the reference to the EXCEPTIONS-CLIENT file from all client library code source files.
The FLOSS exception can can still (at least in February 2011) be found on the MySQL web site.
On the above web site it's clearly stated that the FLOSS exception only applies to code that mentions the FLOSS exception in the code and if one removes the reference, the code reverts to GPL.
To further add uncertainty for the user of MySQL 5.1.55 or later:
- The web site doesn't mention for which MySQL versions the FOSS exception applies.
- It's not clear if one can copy the license text from the web site to include with one's applications (the current legal notice says you can't). This is something that is required with most software distributions.
- If the FLOSS exception text changes on the web site, when will it take effect?
From the above, one can deduce that one of the following new cases now applies (until there is more information available):
- The default MySQL client library code is now GPL and there is no FLOSS exception anymore starting with MySQL 5.1.55.
- The MySQL client library code still has a FLOSS exception, but by having it only on the web site, Oracle can change it any time and the changes will at once affect any new distributions of the code (also for old versions of MySQL that do not include an explicit FLOSS exception in the distribution).
If you want to be safe and sure that you can continue to use the MySQL client library with the FLOSS exception in the future without 'surprises', you have one of the following options:
- Use the client library from MySQL 5.1.54 and never upgrade your clients to MySQL 5.1.55 or above.
- Use the MariaDB client library. This is a fork of MySQL 5.1.54 and it will not be updated with any new MySQL code to ensure we can continue to deliver it under FLOSS exception terms.
- Use some of the other MySQL client libraries or ways to connect to MySQL/MariaDB mentioned above.
Legal notice
The text above is written by Michael "Monty" Widenius, who is not a lawyer and you should not regard any statements of the above as 'ultimate truth' in all scenarios. On the other hand, it was David and Monty who together decided to make MySQL GPL and also decided and openly declared the intentions behind this license change, so there is some merit to information in this article.
If you want a second opinion of how GPL works in this case, you can contact Software Freedom Law Center or Free software foundation about this. Neither part has had anything to do with this KB article but they are the default authorities to turn to when you want to know more about the GPL.