views:

1136

answers:

4

HI All,

We have a .Net 2.0 application which has a MySQL backend. We want to be able to deploy MySQl and the DB when we install the application and im trying to find the best solution. The current setup is to copy the required files to a folder on the local machine and then perform a "NET START" commands to install and start the mysql service. Then we restore a backup of the DB to this newly created mysql instance using bat files. Its not an ideal solution at all and im trying to come up with something more robust.

The issues are User rights on Vista, and all sorts of small things around installing and starting the service. Its far too fragile to be reliable or at least it appears that way when i am testing it. This is a Client/Server type setup so we only need to install one Server per office but i want to make sure its as hassle free as possible and with as few screens as possible.

How would you do it?

+1  A: 

Use an installer with a worked out script. Any installer like Wise, InstallShield, InnoSetup, etc will probably do.

Lars Truijens
A: 

With a Client/Sever setup, you're allowed to require that whoever installs the server install it as an admin. That should solve most of your problems.

Again- that's the server. The clients might be another story.

Joel Coehoorn
+2  A: 

Not sure where you're at in the project, but if it's a simple and small database you might consider converting it to SQLite. It's not ideal for Client/Server operations, but if it's low volume/transactions it might work.

Dan Williams
+2  A: 

We took a different approach on this. We make MySQL xcopy-able, by writting a wrapper to generate the configuration file(my.ini) before calling MySQL (to correctly setup the base path and so on). Then we written another service installed using the standard setup. This service will take care of starting MySQL and other required background program (in our case Apache) for us. Since the MySQL is deploy by us, we wanted to have full control over it.

faulty