<p>HI All,</p>

<p>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.  </p>

<p>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.</p>

<p>How would you do it?</p>

[{'answer_id': 49405, 'author': 'Lars Truijens', 'author_id': 1242, 'author_profile': 'https://Stackoverflow.com/users/1242', 'pm_score': 2, 'selected': False, 'text': '<p>Use an installer with a worked out script. Any installer like Wise, InstallShield, InnoSetup, etc will probably do.</p>\n'}, {'answer_id': 49754, 'author': 'Joel Coehoorn', 'author_id': 3043, 'author_profile': 'https://Stackoverflow.com/users/3043', 'pm_score': 0, 'selected': False, 'text': "<p>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.</p>\n\n<p>Again- that's the server.  The clients might be another story.</p>\n"}, {'answer_id': 60694, 'author': 'Dan Williams', 'author_id': 4230, 'author_profile': 'https://Stackoverflow.com/users/4230', 'pm_score': 4, 'selected': True, 'text': '<p>Not sure where you\'re at in the project, but if it\'s a simple and small database you might consider converting it to <a href="http://www.sqlite.org/" rel="noreferrer">SQLite</a>.  It\'s not ideal for Client/Server operations, but if it\'s low volume/transactions it might work.</p>\n'}, {'answer_id': 376891, 'author': 'faulty', 'author_id': 20007, 'author_profile': 'https://Stackoverflow.com/users/20007', 'pm_score': 2, 'selected': False, 'text': '<p>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.</p>\n'}]
['https://Stackoverflow.com/questions/49378', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2720/']