Question

I've recently wrote up a little application for work to ease our on the fly notetaking. I wrote the program in IronPython, but have since hit a brickwall as I can't find an easy way to connect to an external MySQL server we host for record keeping.

My constraints for this application are that it has to be purely portable across both Win XP and 7 systems. So basically, no installations.

I've read up on MySQLdb and some others but can't seem to find anything that does not require installation.

What classes or libraries can I use to straightforwardly connect to a MySQL server, without installing anything? If there are none for IronPython, is there one for another language? Alternatively, is there a way to use MySQLdb without requiring it to be installed on the client system?

Was it helpful?

Solution

A very simple and easy to deploy solution is using Connector/Net. You only depend on a single assembly (mysql.data.dll) that needs to reside beside your application (or wherever you choose). The documentation has a few examples on how to use the connector from C#/.NET which can be used as a guide on how to use it from IronPython as well.

Another possible solution could be using Connector/Python. It is native python without any managed or native assemblies but it comes in the form of several .py files which could possibly be embedded within your executable.

MySQLdb probably won't work because of its native assemblies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top