Link to home
Start Free TrialLog in
Avatar of damianb123
damianb123Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Creating an installer package to install Application and MySQL automatically

hi,
    I have written a VB application and it uses MySQL, I want to configure an installer which will automatically rollout MySQL, apply the required SQL code to create the database, tables and structure, then install my App - leaving the customer with a fully working solution.

Does anybody have any ideas?

Thanks
Avatar of almander
almander

I would add something to your application to do this. As opposed to making it part of the installation process. Something like a Create new database procedure in your application that is executed when the application is first run.

To create the database I would execute a script that has all of your necessary commands in it.

If you want to install mysql automatically, more information about your environment is needed. But you should look for a MySQL bootstrap installation that matches your environment.
Avatar of gplana
You should create an installer using InstallShield or something similar. You should also include the MySQL installer if you want to install MySQL at the target machine.

For getting SQL sentences to create the databases, just use phpMyAdmin which has an option to export database to SQL commands. Save this to a text file, and execute this on the target MySQL to create the database with its contents.

Hope it helps.
No need for installshield unless you already have it, you could still use the installer in Visual studio. Depends on the version of visual studio you are using?
I want just to note that some Visual Studio versions include some versions of InstallShield, like InstallShield Express.
Avatar of damianb123

ASKER

Hi, I'm using visual studio 2008 professional
In VS 2008, you can create the installer and add MySQL as a pre-requisite. Then before the application installs, it will install the MySQL from the specified path. Either from the installation disc or by downloading from the manufacturer.
Thanks deepusreedhar,
    Could you provide more information on where I can do this  and how within VS 2008?

Thanks
Hope you know how to create a deployment project for your application in your solution.
then you can right click on the deployment project to get into the property page where you can find the prerequisites button. there you have the option to choose prerequisites and tick box for create installer package for them and options for downloading from website while installing or to install from CD or so. See the attached file,
property-page.JPG
prerequisites.JPG
But when I check it doesn't give the option for MySQL, only SQL Server from Microsoft.  How can I add my own items into the pre-requisites?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Deepu Sreedhar
Deepu Sreedhar
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect, this worked great!

Thanks