Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy MySQL Server + DB with .Net application

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?

like image 516
SecretDeveloper Avatar asked Sep 08 '08 09:09

SecretDeveloper


3 Answers

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.

like image 168
Dan Williams Avatar answered Oct 23 '22 05:10

Dan Williams


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

like image 27
Lars Truijens Avatar answered Oct 23 '22 07:10

Lars Truijens


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.

like image 37
faulty Avatar answered Oct 23 '22 07:10

faulty