MySQL & ActiveRecord Licenses

MySQL's license is GPL. ActiveRecord, which (I presume) uses MySQL's client libraries, is under the MIT license. How does ActiveRecord avoid being GPL?

I’m no attorney but I believe the answer is that ActiveRecord is not modifying MySQL but is a separate framework for accessing it as well as a number of other databases. You still need a copy of MySQL if you want to use the part that can access it. The FAQ for GPL/GNU explains more in the section on “Using programs released under the GNU licenses when writing other programs”.

http://www.gnu.org/licenses/gpl-faq.html

B.

GPL requires that if you link with the library, you have to have a GPL- compatible license so that the result is available under GPL. See: http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL

So, if ActiveRecord is linking with the MySQL libraries, then my understanding is that it should be GPL (or something compatible). Just to clarify, I do not wish ActiveRecord to be GPL, and I do not even like GPL. I am just trying to understand how they have avoided that license issue, because it has implications for the Ruby on Rails web application I am working on (for which we are working on a license).

    --Paul

Oracle makes an exception to the GPL for MySQL which (loosely paraphrasing) allows linking the MySQL client libraries with non-GPL'd software, as long as that software is licensed under another approved FOSS license:

http://www.mysql.com/about/legal/licensing/foss-exception/

Chris

According to the MIT License it is compatible with GPL (http://en.wikipedia.org/wiki/MIT_License). There is more links in there to how the compatiblity works. To my knowledge no one has had a legal issue yet with connecting their Rails app through ActiveRecord to MySQL. I hope that helps.

B.

GPL requires that if you link with the library, you have to have a GPL- compatible license so that the result is available under GPL. See:Frequently Asked Questions about the GNU Licenses - GNU Project - Free Software Foundation

So, if ActiveRecord is linking with the MySQL libraries, then my understanding is that it should be GPL (or something compatible). Just to clarify, I do not wish ActiveRecord to be GPL, and I do not even like GPL. I am just trying to understand how they have avoided that license issue, because it has implications for the Ruby on Rails web application I am working on (for which we are working on a license).

My reading of http://www.mysql.com/about/legal/licensing/foss-exception/ is that there is an exception for linking with the mysql libraries, as long as the work produced is under one of many licenses (including the mit license, which is the license under which rails is distributed if my memory is correct).

That said, activerecord doesn't link to any native libraries. If you use the mysql adapter, that pulls in the mysql gem, which does obviously load the mysql library, but if you don't use mysql then that will never happen. Don't ask me what the legal implications are!

Fred

License compatibility isn't bi-directional.

"MIT is compatible with GPL" means that you can link to or include an MIT-licensed library in your project, and then license your project (the combination of your work and the MIT-licensed library) under the GPL.

However, because of the viral nature of the GPL, you cannot link to GPL'd code in your project and then license your project under the MIT license. This is only possible if the copyright holder of the GPL'd code grants you an additional license (which is the case with the MySQL client library).

Chris

You are right. I should have been asking about the MySQL gem, instead of ActiveRecord. The MySQL gem is licensed under the Ruby license, but links with the MySQL client libraries, and so (if I am correct) should be GPL instead. But, if that becomes GPL, then it would infect ActiveRecord, and so we are back to my original question. I would be delighted to find that I am wrong about that.   --Paul