How to Integrate MYSql in C# Setup Project? - mysql

I want to install MySql and Database File while installing the Setup File,
which is developed in C#.
simply, while installing the setup file only everything needs to be installed
(MYSql,Database File)
So, please guide me on this.

You can set Custom Launch Options to the Setup file. Add the necessary executibles in the Commit node of the setup file and those will get executed when your installation finishes.
As for installing entire MySQL, you would need to add the installation files of MySQL to the Setup project. Executing the Database Script would be simple, just call the script after MySQL installs.

Related

How to install extension on server in yii2

I have an website running on server.
I want to use graph extension to show some reports.
How do install extension on server?
Locally I can use cmd for that, do I need to download project install extension and upload it again?
You have to enable SSH access on your server.
DigitalOcean SSH tutorial - here you can find some helpful informations about SSH connection.
If you connect by SSH, navigate to project directory and use composer install or composer update.
If you don't have a command line access to your server and so cannot use composer directly, I would recommend to do prepare the code locally in a 'deploy' folder and then copy the whole folder content, including the vendor directory, to the server. I assume that you can use composer locally, so that you can install the extension regularely . And I assume that the local machine and the server does differ to much (PHP version, other settings).
Installing the yii2-extension does mean: if you install it with composer install Yii gets prepared so that you can use the code like any other code in your application. Installing the extension creates an entry in `vendor/yiisoft/extension.php which gets evaluated each time the application gets loaded.

How to deploy a laravel project?

Like the question says How I should deploy a laravel project? that is already on github.
Do I need to install laravel whit the composer on the web server or just copy the whole directory of my proyect that have the folders app,public,vendor and the other files?
It depends on your server. If you hava full access to server (such as vps or even dedicated), it's good to install composer there and do laravel installation use Composer, allow you to easily manage your project later. Otherwise, yes, you have to copy all files including vendor directory to your server.
Note, if you're going to deploying to shared server which you have no full access to, you probably want to create fresh laravel installation (production version of your project) with --prefer-dist and --no-dev locally first. It'll reduce application file size.

Visual Studio Windows Installer with MYSQL check and Install

I have a VB Windows forms application that uses a mysql database to keep track of everything within the application.. The problem that I know will occur is that most of the applications users will not have MYSQL let alone know how to install it properly... To install the application on the users systems I am using the Visual Studio Setup Installer to handle creation of the msi files.. What needs to happen first is the installer needs to check to see if MYSQL is installed on the host system and verify server name.. If true then import database, if not then install followed by import database... The importing is not the issue here... How do I make the installer install mysql with controlled parameters such as server name, etc, etc. Any ideas on this??? I have hammered google for the past 3 hours looking for bread crumbs on this but to no avail...
Usually existing packages (like the MySQL installer) are added as prerequisites. Visual Studio setup projects do not support custom prerequisite creation. However, this can be done by manually generating the required manifests.
You can find the manifests structure here: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\
You can then select the prerequisite in your setup project properties page.
Well... that's a good question. The first thing that pops up in my mind:
You could build the check in your application instead of the installer and warn the user about it. If needed, you could provide another installer to make sure everything is available (MySQL and the database itself).
I hope it helps you further.
Yours sincerely,
Roland

Adding MySQL in bootstrapper

While making setup file, we can add SQL Server Express as pre-req so setup installs that first.
How to do the same with MySQL? I want my application to install MySQL if not installed on the target PC.
Thanks
Since Visual Studio doesn't have a predefined prerequisite for MySQL, a solution is to manually add the prerequisite. You can find more details here:
Install other apps with our setup - vs2010 Desktop App Deployment

create and restore a mysql db using a setup project (installer) in VS.Net

What is the best practice for creating an installer for a winform application.
The application is supposed to install the following without connecting to internet.
.Net Framework 3.5sp1
MySQL Server
My SQL Connector
Restore Mysql db
Update Config file with the MySQL uname/pwd.
I have all the msi files for installing the above mentioned items. But am wondering about the best practice to create the installer.
Thanks in advance,
Hi I came up with a similar situation. Firstly you should have .NET framework offline installer which can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=992cffcb-f8ce-41d9-8bd6-31f3e216285c. I assume you are using visual studio installer. There are couple of choices but I prefer to copy the offline .NET installer to the setup projects output directory and from requirements on target machine tab I set the install URL property of .NET framework the exact name of offline setup file. As described in the figure.
So the installer does not try to connect to a remote computer to download .NET framework and install it however I think it is more appropriate that it connects to a Microsoft server and installs it. Anyways the next step is to configure the MySQL server. MySQL is really generous for me since they support a fully documented noinstall files. You can find the document here: http://dev.mysql.com/doc/refman/5.5/en/windows-install-archive.html
Using a noinstall zip archive you can copy the dbengine core files to any folder on the clint machine. And change the configuration parameters of MySQL. You can name the MySQL service anything you want. Start the the service and create tables. You can do all of this stuff from custom actions tab of the setup project choosing the appropriate script files or you can write code for it. The beautiful thing is that your customer does not need to know that he/she is installing a database engine on the target machine. I hope this helps. Thanks.