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

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.

Related

How to install or transfer the existing moodle project from ubuntu to Windows (Postgres to MariaDB sql)

My company has two web based project. Our main project (Starbooks) was built using xampp server and Codeigniter framework that installed in our Windows OS and the second project (Frontlearners) was built in Lamp server and moodle (LMS) framework with Postgres database that installed in ubuntu platform.
My goal is to collide this two projects into one by moving the second project (Frontlearners) into the main project (Starbooks) server which uses with xampp server windows platform.
My first attempt is to export the moodle Postgres database using PGAdmin then move the moodle project to the main project server on windows. But I don't know if this is the correct way or not because Postgres and mysql are different database type. I've searching across the internet hoping for the answer or tutorial related to my problem but the results are always fresh installation of moodle which is not related to my problem.
Anybody knows how to solve this problem, a tutorial link, or any article about this situation?
There is a database transfer tool in Moodle.
https://docs.moodle.org/311/en/Database_transfer
So you can convert the PostgreSQL database to MariaDB
First ensure MariaDB is installed on Ubuntu
Turn off cron and put the site in maintenance mode
Then go to Site administration > Development > Experimental > Database migration to convert the database.
Or direct to /admin/tool/dbtransfer/index.php
The tool will check the database structure matches the structures in the install.xml files. If there are any differences, then you will need to update the relevant install.xml file or database table before continuing.
If its a large database, then the UI will probably time out. So use the command line version instead:
php admin/tool/dbtransfer/cli/migrate.php --help
Having said all that, IMHO I would transfer the Windows project to Linux.

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

How to Integrate MYSql in C# Setup Project?

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.