Using MySQL licensing: Open source license vs. commercial license

Get an overview of the MySQL open source licensing options in this excerpt from "The Definitive Guide to MySQL 5".

One of the most interesting features of MySQL is the license. MySQL is an open source project. That is, the complete source code of MySQL is freely available. Since June 2000 (that is, since version 3.23.19) the GNU Public License (GPL) has been valid for MySQL. It is thus ensured that MySQL will continue to be freely available in the sense of the open source idea. (For commercial applications of MySQL there is a second, commercial license available in addition to GPL. More on this later.)

Rights and Duties with Respect to the GPL

Open source is often incorrectly interpreted to mean "without cost." It is indeed true that GPL software can be used without payment of fees, provided that one adheres to certain conditions. However, the open source idea goes much further:

  • Since the source code is freely available, when there are problems, you are not at the mercy of a software vendor.
  • When problems arise, you can perhaps attempt to repair the problem yourself or to implement features that are lacking. Furthermore, you can appeal to the developers' group for help.
  • You can be certain that the program code has been read by many developers and does not contain any unsavory surprises (such as so-called back doors such as the database system Interbase had for many years, whereby access to every Interbase database was possible via a hard-coded password).
  • You are permitted to alter GPL products, and indeed sell the resulting new programs.
  • At the end of this list of GPL merits there are a few demerits (for commercial applications). If you wish to use a GPL program as the basis for a commercial product, you must again make your own source code freely available, in the sense of GPL, with the changes made. This is seldom something that developers of commercial products wish to do. In general, then, every program that is derived from GPL software exists under the terms of GPL. (GPL is, so to speak, transmitted.)

    Tip: Further information on the open source idea, the full text of GPL, and explanations can be found at the following addresses:

  • http://www.gnu.org/copyleft/gpl.html
    http://www.opensource.org/osd.html

Chapter table of contents: What is MySQL?

Part 1: Database glossary 
Part 2: MySQL features 
Part 3: MySQL limitations 
Part 4: MySQL version numbers 
Part 5: MySQL licensing
Part 6: MySQL version names 
Part 7: MySQL alternative

Use of MySQL with an Open Source License

The following list collects the different situations in which one may freely use MySQL in the sense of GPL:

  • MySQL can be used without cost if an application is locally developed and not used commercially. It is only when the resulting solution is to be sold to customers that the question of licensing comes into play. This rule is expressed on the MySQL home page as follows:
    Free use for those who never copy,modify, or distribute.
  • MySQL can be used freely within a web site. If you also develop a PHP application and install it with your Internet service provider, you do not have to make your PHP code freely available in the sense of GPL.
  • Likewise, an Internet service provider may make MySQL available to its customers without having to pay MySQL license fees. (Since MySQL is running exclusively on the ISP computer, this application is considered internal.)
  • Finally, MySQL license can be used free of charge for all projects that themselves run under the GPL or comparable free license. (If you have developed a new free e-mail client for Linux, say, and wish to store e-mails in a MySQL database, you may do so without further ado.)

Use of MySQL with a Commercial License

In the sense of GPL the following uses are prohibited:

  • You may not change or extend MySQL (that is, the database server) or sell the new version or product thus created without simultaneously making the source code of your changes freely available. You are thus prohibited from developing a new database system based on MySQL if you are not prepared to make your extensions freely available to the MySQL community in the sense of GPL.
  • It is forbidden to develop a commercial product, such as a bookkeeping program, that is geared toward MySQL as the database without making the code available in the open source sense. If the limitations of the GPL are not acceptable to you as a commercial developer, then you may sell your product (program) together with a commercial MySQL license. This can prove worthwhile because MySQL remains available to you even if you are unable or unwilling to make your code available in the sense of GPL.
  • The firm MySQL offers commercial licenses for consumers (that is, purchasers of their database applications) in two formats:
    • MySQL Network: Here the buyer obtains the right to run one MySQL Pro Certified Server with InnoDB support for one year. (A server is considered to be one computer, regardless of the number of CPUs.) There is no limitation on the number of clients that can access the server. The program MySQL Network also contains access to special compiled server versions that are said to be particularly stable, e-mail and telephone support, as well as various other services. Updates to the MySQL server (even for versions 4.0 and 5.0, etc.) are free during the period of the program.
    • Classic Commercial MySQL License: Since the introduction of the program MySQL Network the once common normal licenses have become hard to find. (Use the last link of the following list.) Classic MySQL licenses have no time limit, but are restricted to a particular principal server version. (If you have a license for version 4.0, you must apply for a new license for version 5.0.) The cost is quite reasonable in comparison to commercial database systems (currently $295 for a license without InnoDB support and $595 for a license with InnoDB support, with a significant reduction starting at ten licenses).

The advantage of the program MySQL Network is in the additional services and the free update option. Classic licenses are cheaper, on the other hand, once the MySQL server has been installed and should just run.

Tip: Further information on MySQL licensing can be found at the following sites:
https://www.mysql.com/company/legal/licensing/
https://www.mysql.com/network/
https://order.mysql.com/ https://shop.mysql.com/?sub=vt&id=software

Commercial Licenses for Client Libraries (Connector/ODBC, Connector/J, etc.)

In addition to the actual MySQL server, the MySQL company offers client libraries that are necessary for the development of application programs (there are additional drivers that have been developed outside of the firm MySQL, such as the PHP driver):

C-API: Application interface for C programming
Connector/C++: Library for C++ programming
Connector/J: JDBC driver for Java programming
Connector/MXJ: J2EE MBean driver for Java programming
Connector/NET: .NET driver primarily for programming under Windows
Connector/ODB: ODBC driver for all programming under Windows

Like MySQL, these drivers are available under GPL. Many MySQL client libraries, such as the JDBC driver Connector/J, used to be available in earlier versions under LGPL (lesser Gnu public license), which implies fewer restrictions for commercial applications. The situation changed, however, with version 4.0.

If you wish to use these drivers in commercial applications, the following rule is in force: If MySQL client programs access a MySQL-licensed server, then this server license is valid for the client libraries. It is thus usually unnecessary to obtain licenses for the use of client libraries, because the client libraries are automatically included with the server license.

However, if you develop and sell a commercial program but do not deliver it together with MySQL and leave the installation of the MySQL server and its licensing to the customer, then you must obtain licenses for the client libraries used in your program.

Explicit licensing of the client library is seen by the MySQL company as an exception, since as a rule, the server is licensed. Commercial licensing of the client library actually represents nothing other than a protection of the MySQL company's commercial interests. They want to avoid the situation in which commercial developers get around having to obtain a commercial license simply by not providing the MySQL server. The customer then loads the GPL version of the MySQL server from the Internet and believes that all is right with the world. In such a case the MySQL company would receive nothing for the development of a commercial MySQL product.

Client Licenses for the PHP Project, F(L)OSS Exception

Since MySQL 4.0, the GPL license for client libraries has led to problems with some other open source projects. For example, the PHP project is not subordinate to GPL, but to another open source license that is considerably more liberal and contains fewer restrictions for commercial applications. If PHP were to provide the MySQL client library under GPL, the GPL would have to hold for the entire PHP project. PHP developers were not agreeable to this. MySQL therefore defined an exception that permitted the PHP project to make the MySQL client library part of PHP.

For other open source projects that do not use the GPL license, MySQL has defined the FLOSS or FOSS license exception. FLOSS stands for Free/Libre and Open Source Software. (On the MySQL Web site the exception is often abbreviated FOSS.) Open source projects that exist under a license that is part of the FOSS exception are permitted to integrate the MySQL client library into their code without the GPL restrictions coming into play. Further details on these license exceptions can be found here:
https://www.mysql.com/company/legal/licensing/faq.html
https://www.mysql.com/company/legal/licensing/foss-exception.html

Red Hat has long considered these license exceptions as not extensive enough. Therefore, the Linux distribution Red Hat Enterprise (RHEL) and Fedora Core for years contained the obsolete MySQL 3.23.n package. That has changed with Red Hat Enterprise 4 (February 2005) and Fedora Core 4 (April 2005). Both distributions contain MySQL 4.1, which at this time is the most stable version of MySQL.

Chapter table of contents: What is MySQL?

Part 1: Database glossary 
Part 2: MySQL features 
Part 3: MySQL limitations 
Part 4: MySQL version numbers 
Part 5: MySQL licensing
Part 6: MySQL version names 
Part 7: MySQL alternative

The above tip is excerpted from from Chapter 1, "What is MySQL?" of The Definitive Guide to MySQL 5 by Michael Kofler, courtesy of Apress. Find it helpful? Purchase the book here.

About the author: Michael Kofler holds a Ph.D. in computer science from Graz Technical University. He has written a number of successful computer books on topics such as Visual Basic, Visual Basic .NET, and Linux. Michael is the author of The Definitive Guide to MySQL 5, Third Edition and Definitive Guide to Excel VBA, Second Edition from Apress.

Dig Deeper on MSP business strategy