MYSQL installation with a .NET winforms app

前端 未结 6 1816
孤独总比滥情好
孤独总比滥情好 2020-12-20 18:57

I have a C# application that\'s utilizes MYSQL. I\'m at a beta release point and need an installation package that includes my application, along with MYSQL. So basically, I

6条回答
  •  别那么骄傲
    2020-12-20 19:50

    @Orion Edwards

    Thanks a lot for the steps. I was having the SAME doubt. In fact, We just turned SQLite down because our standalone application needed some procedures and foreign key contraints.But now I feel SQLite is always a better choice for standalone desktop application if it is do be deployed on client machines.

    For now,I have to stick to MySQL. So I'm using different kinds of scripts and mechanisms to handle different possible situations. Eg:

    • If the client machine has no mysql pre-installed, there is a script which completely installs the server and creates the database, users required for my application.
    • If mysql is pre-installed on client machine, I'm asking user for mysql's root username and password and setting up the database & users from within the apllication.
    • And thirdly, if for some reason client machine had mysql server earlier and then it was uninstalled, since mysql DOES keep track of previous root password even after uninstalling,I run mysql server's .msi, reset the password (manually carry out some steps), and finally create instance of database, all within a script (of course these steps are needed to be carried out by US, not the user as this is a very rare case.)

    Is this approach OK? Or there is a better,appropriate way to do this?

    In future I think i'll stick to SQLite! :-p

提交回复
热议问题