UseMySqlDatabase()
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
UseMySqlDatabase()
Now that you can write cgi and fcgi programs, it would be really handy to have a way of directly accessing a MySql database. Using an ODBC connector can be pretty complicated if you have just added the cgi script to a third party webserver.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: UseMySqlDatabase()
This is asked a lot, but it is not possible due to the license of the mysql libraries.
quidquid Latine dictum sit altum videtur
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: UseMySqlDatabase()
Fred, isn't MariaDB a drop in replacement for MySql, written by the original MySql author?
Couldn't that be used somehow?
Couldn't that be used somehow?
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: UseMySqlDatabase()
Fred: How about allow it if the libs are copied manually by the programmer to the correct place (before compilation) - that way it's up to them to sort out the licencing?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: UseMySqlDatabase()
That would not help. The GPL states:DoubleDutch wrote:Fred: How about allow it if the libs are copied manually by the programmer to the correct place (before compilation) - that way it's up to them to sort out the licencing?
You cannot distribute the "complete" source code of a PB program, because you do not have the sources to the PB libraries which you use. The GPL only makes an exception for libraries that come as part of the OS, not libraries included with the programming language. Therefore its is impossible to distribute any compiled PB program that includes GPL code without violating the GPL. It doesn't matter who copied the library where.3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange;
Things are different with the LGPL, where the affected code can simply be compiled as a dll and the problems are solved.
quidquid Latine dictum sit altum videtur
Re: UseMySqlDatabase()
If they have a compatible license and provide a client library then this may be an option.Fangbeast wrote:Fred, isn't MariaDB a drop in replacement for MySql, written by the original MySql author?
Couldn't that be used somehow?
quidquid Latine dictum sit altum videtur
Re: UseMySqlDatabase()
https://mariadb.com/kb/en/mariadb/licen ... rary-for-c
https://mariadb.com/kb/en/mariadb/licen ... sql-serverUsing the MariaDB client library for C
If your application is using a license that is not covered by the FLOSS exception, then you should use the new LGPL client libraries or C.
The LGPL license allows you to distribute these MariaDB client library freely with any application. If you modify the client library, you need to publish the new source code.
[...]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.[...]
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: UseMySqlDatabase()
Freak: How about for code that is used internally - like a utility or something that runs on your own servers - not for sale?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: UseMySqlDatabase()
UseMariaDatabase()
This would fix the problem, it also looks like it will work with MySQL db...
"It is also API compatible with the MySQL connector, allowing you to connect to legacy MySQL instances as well. "
This would fix the problem, it also looks like it will work with MySQL db...
"It is also API compatible with the MySQL connector, allowing you to connect to legacy MySQL instances as well. "
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: UseMySqlDatabase()
The GPL is mostly about distribution. If you don't distribute or sell it then I see no problem (that is just my interpretation. If in doubt, ask a lawyer).DoubleDutch wrote:Freak: How about for code that is used internally - like a utility or something that runs on your own servers - not for sale?
quidquid Latine dictum sit altum videtur
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: UseMySqlDatabase()
If that is mentioned with the command then it should be able to be added, no?
Or the MariaDB version instead as that looks like there is no problem with distribution and works to connect to Maria or MySQL DB.
Or the MariaDB version instead as that looks like there is no problem with distribution and works to connect to Maria or MySQL DB.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: UseMySqlDatabase()
We won't add a command which makes you unable to distribute the resulting executable. That makes no sense and is just a waste of work. Not to mention that including the PB library in PB also counts as distribution.
quidquid Latine dictum sit altum videtur
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: UseMySqlDatabase()
huh?
"Or the MariaDB version instead as that looks like there is no problem with distribution and works to connect to Maria or MySQL DB."
"Or the MariaDB version instead as that looks like there is no problem with distribution and works to connect to Maria or MySQL DB."
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: UseMySqlDatabase()
http://www.purebasic.fr/english/viewtop ... 75#p293275
I charge less than $300 for my application and I have to pay $2000 for the license?

I make use of libmysql.lib to access mySQL databases in client's web servers - you know the one that is pre-installed on most web hosts that is administered with cPanel and phpMyAdmin. But I do not distribute the libmysql.lib file or any other mySQL component with my compiled .EXE application (it is closed source paid application btw).Fred wrote:It means than if you use this lib (dll or statically linked) in a non-GPL program you have a to buy a license to mysql.
I charge less than $300 for my application and I have to pay $2000 for the license?

