how to make an installer for c sharp application with mysql database

i would like to know how to create a c# windows form application installer using visual studio with a mysql database created with phpmyadmin. i need to know this for my project submission.

thank you
Posted by aslam 6/23/2014 10:04:59 AM
Total Answers : 2
Answer 1
Dear Aslam please go through the below link where you get the idea about creating C# installer with database :
http://stepcoder.com/Articles/10034/how-to-create-setup-of-visual-studio-windows-application-with-database
Posted by StepCoder Team 7/1/2014 10:43:06 AM
Answer 2
When faced with a similar situation I simply included a MySQL distribution with the application (this was for internal purposes, you may need a license to distribute MySQL commercially).

Here's what I did:

1). I installed a MySQL server on a local machine. I configured it so that the data folder and the configuration file reside in the same folder as the rest of the MySQL server. I then created the database, an user, and filled the database with relevant data.

2). I included the entire MySQL folder in the installer. The installer would simply copy this folder to the application's destination folder.

3). I could then start MySQL like this: {app_folder}\mysql\bin\mysqld.exe --defaults-file="{app_folder}\my.ini". To stop MySQL I used: {app_folder}\mysql\bin\mysqladmin.exe -u youruser -p yourpassword shutdown. You could have your application check if MySQL is running and start it if not.

This might not be the best solution since anyone could easily access the database. Also I cannot confirm if this would work with the current versions of MySQL (you may need to specify the data folder in the configuration file). If the database is only used by your application SQLite might be a better option.
Posted by StepCoder Team 7/1/2014 10:50:52 AM
Post your answer
Preview
Sign in to your account
Your Email : 
Password :   
Forgot your password
Don't have StepCoder account ?
Create a new account
 
Follow me on twitter
About Me
Harpreet Singh
I began programming with C++ when i was 17. Then at the middle of my study .NET came. Then I began to read C# and VB.NET. By the time i learnt SQL and ASP.NET, and developed some websites such as news portals that are active now. Currently i am running my own Software company.
Answer these questions! If you know the answer.