There are a couple of DLLs floating around in the forums that are used to access MySQL from Unity. I think they used to be included in Unity and aren’t any more (at least I couldn’t find them in the programs dir).
Are these free to distribute in my own products or do they need permission from a licence holder or something?
You might want to consider connecting to a web service (using SOAP or XML) running on a web server and then have the web service handle talking to your MySQL database.
since the free licensed version of MySQL is GPL licensed, all distributed software that goes along with the GPL licensed software must adhere to GPL.
In other words, mix and match in not allowed. Unity is not GPL, and combining Unity with MySQL community edition parts, everything becomes GPL
(thus Unity must become GPL too). Since this cannot be done, you either need a commercial MySQL license, to bypass GPL restrictions, OR use MySQL as a service not directly related to a product. (e.g. database server on a webserver).
If you really need to provide direct database connectivity, you could check for other database servers.
E.g. SQLite, perhaps postgreSQL?
In many occassions, GPL is too restrictive to combine with or use for commercials products to be distributed.
LGPL is better, but still restrictive for many.
Thanks for the info. So if I want to use MySQL as a backend I have to “clean room” it. Distribute nothing of MySQL and use a web service as a go between that the end user would have to provide themselves. Something like Wamp or whatever?
I was actually thinking of using a setup like that. Have a DB server machine with much of the query logic etc in php scripts there. Have the application send parameters and let the db server do the grunt work.
If you are going to be distributing MySQL as sellable software, that requires each sale to have a MySQL Installation, you will need to license it. Also see the post above about GPL.
But if you are just using it on a server, then you can use the community edition.
If you need a local database for game client local storage, use SQLite.