Qt + MySql plugin, license



  • Hi all,
    I need to use Qt MySql plugin in my commercial application and I've read that if I include MySql header ("mysql.h") in my application I need a Mysql commercial version. I know that "qsql_mysql.h" Qt header include "mysql.h".

    How do you use MySql? Do you buy MySql license for every commercial application that use Qt MySql plugin?



  • I would suggest Firebird as an alternative to mysql. You can use the Firebird-Server or Embedded-Version for easy deployment. MySQL is only free for GPL-Apps.



  • [quote author="jensen82" date="1311525260"]I would suggest Firebird as an alternative to mysql. You can use the Firebird-Server or Embedded-Version for easy deployment. MySQL is only free for GPL-Apps.[/quote]

    I know some alternatives to MySql but unfortunately I need MySql.

    Another possibility should be to use ODBC so that I can avoid to iclude mysql header in my application...
    Am I wrong?


  • Moderators

    Yes, you could use ODBC. In my experience with other db it will be slower. But I don't know if that's important for you.

    Edit : technically it is possible.



  • Guys, this can't be stressed enough: a forum is NOT the right place to discuss legal matters.
    Do yourself a favour and hire an IT lawyer to double and triple check that you're not doing anything wrong.



  • Does your application ship with a commercial version of MySQL server? If yes, the use of the client library is covered by the servers license. If not, you are required to license the client library - except you are going GPL or FLOSS.

    This is how I read the license - IANAL!



  • The application is a commercial application and should include "mysql.h".
    I don't know witch version of MySql Server should I use.

    Searching in Google some people say that I need Commercial license and some other that I don't need...



  • "Commercial License for OEMs, ISVs and VARs":http://www.mysql.com/about/legal/licensing/oem/

    bq. OEMs (Original Equipment Manufacturers), ISVs (Independent Software Vendors), VARs (Value Added Resellers) and other distributors that combine and distribute commercially licensed software with MySQL software and do not wish to distribute the source code for the commercially licensed software under version 2 of the GNU General Public License (the "GPL") must enter into a commercial license agreement with Oracle.

    bq. Oracle makes its MySQL database server and MySQL Client Libraries available under both the GPL and a commercial license. As a result, developers who use or distribute open source applications under the GPL can use the GPL-licensed MySQL software, and OEMs, ISVs and VARs that do not want to combine or distribute the MySQL software with their own commercial software under a GPL license can purchase a commercial license.

    If you create or distribute software which is not covered under the GPL you will have to license the MySQL server or client libraries.

    Nevertheless you should always consider getting legal advice. Otherwise it might get pretty expensive pretty fast - especially when using software from Oracle - the worlds now greatest patent troll.



  • IANAL, but if you only write your application against QtSQL, with no vendor specific SQL code, and you let the users choose which sql driver they will use through the configuration files (i.e. no addDatabase("QMYSQL") hard-coded in your application), your application won't be in any way dependent of any GPL code, and won't be covered by the GPL.

    Since GPL does only restrict distribution and not usage, your users will be free to download the MySQL plugin and server separately and use it with your proprietary application.
    You can still distribute MySQL and the plugin yourself, but not in the same package as your application.



  • [quote author="alexisdm" date="1311601895"]IANAL, but if you only write your application against QtSQL, with no vendor specific SQL code, and you let the users choose which sql driver they will use through the configuration files (i.e. no addDatabase("QMYSQL") hard-coded in your application), your application won't be in any way dependent of any GPL code, and won't be covered by the GPL.

    Since GPL does only restrict distribution and not usage, your users will be free to download the MySQL plugin and server separately and use it with your proprietary application.
    You can still distribute MySQL and the plugin yourself, but not in the same package as your application.[/quote]

    I don't understand very well.
    My application need to connect to a MySql DB so I need to provide to the users the Qt library with the Qt MySql plugin.



  • Let's say:

    • A = Your proprietary application
    • B = The Qt MySQL plug-in
    • C = The Qt Sqlite or ODBC plug-in

    You want your users to be able to use A + B.

    But if A can't work at all or as usefully without B, A is legally a derivative work of B and must be GPL compatible. So you have to do a little extra work to ensure that A can also use C instead of only B and still work correctly.
    Since QtSQL is an abstraction layer for the database connection, if your application can connect to a MySQL database, it can already connect with minimal work to any other Qt-supported database.

    If it wasn't the application role to create and populate the database tables, you may need to provide a way to create the tables with the other sql plug-in too, so that the application would be truly usable with that other plug-in.

    So, now, A can work with either B or C, but if you distribute A + B + C in a single package, B becomes an integral part of A + B + C and the GPL doesn't allow GPL software to be distributed as part of a larger non-free program.
    Because of that you can't put B in the same package as A, but your users can still get A+C and B from you as 2 different packages and combine them themselves to use A+B because:

    • B is effectively independent GPL package available elsewhere, and not written by you to work only with A, and as such can be freely distributed by anyone (as long as you can provide the source code for B),
    • The GPL doesn't restrict the usage, but rather the distribution of GPL covered software.

    You might use an automated installer to combine A + B for your users from the two packages, but you'll still need to get some legal advice to be sure.



  • [quote author="alexisdm" date="1311687510"]Let's say:

    • A = Your proprietary application
    • B = The Qt MySQL plug-in
    • C = The Qt Sqlite or ODBC plug-in

    You want your users to be able to use A + B.

    But if A can't work at all or as usefully without B, A is legally a derivative work of B and must be GPL compatible. So you have to do a little extra work to ensure that A can also use C instead of only B and still work correctly.
    Since QtSQL is an abstraction layer for the database connection, if your application can connect to a MySQL database, it can already connect with minimal work to any other Qt-supported database.

    If it wasn't the application role to create and populate the database tables, you may need to provide a way to create the tables with the other sql plug-in too, so that the application would be truly usable with that other plug-in.

    So, now, A can work with either B or C, but if you distribute A + B + C in a single package, B becomes an integral part of A + B + C and the GPL doesn't allow GPL software to be distributed as part of a larger non-free program.
    Because of that you can't put B in the same package as A, but your users can still get A+C and B from you as 2 different packages and combine them themselves to use A+B because:

    • B is effectively independent GPL package available elsewhere, and not written by you to work only with A, and as such can be freely distributed by anyone (as long as you can provide the source code for B),
    • The GPL doesn't restrict the usage, but rather the distribution of GPL covered software.

    You might use an automated installer to combine A + B for your users from the two packages, but you'll still need to get some legal advice to be sure.[/quote]

    Thanks, this is a very interesting point of view.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.