MySQL configuration and installation - Advanced Installer Community
supermario
Posts: 7
Joined: Mon Nov 03, 2014 11:37 am

MySQL configuration and installation

Hi there,

I am new in installer. I just download advanced installer few days ago and feel exited since it seems more user friendly than others. But I still feel confused with the mysql.
I have develop a winform and website application which has mysql database. I need the installer to install the application along with the database without need user configuration. I mean, the installer should install database with predefine username and password. User no need to manually type-in while install. No need user interaction whatsoever with the mysql database setting. My question is:
1. How to do that?
2. Do i need to install mysql server as prerequisite in every client or just the mysql odbc as prerequisite, or both?

Another question:
3. I'd like to assign user security in some IIS website folders and files which of course the IIS will be installed as windows feature bundle. When I assign the user (actually an application pool) in the 'files & folders' section and run the installer, it got failed with error saying that user don't exist/can't applied or something like that. It seems that the security applied before the files & folders being install, and before the user created (because I create application pool for IIS and like to grant it security to access some folders & files). How to solve this?
4. Let say I have website root in: \root and an upload folder: \root\upload. I'd like to add ftp access using port 21 and give authority to read \root and read&write to \root\upload. I can set this in IIS manager, but how do it with advanced installer?

Thank you so much for your help.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MySQL configuration and installation

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
I am new in installer. I just download advanced installer few days ago and feel exited since it seems more user friendly than others. But I still feel confused with the mysql.
I have develop a winform and website application which has mysql database. I need the installer to install the application along with the database without need user configuration. I mean, the installer should install database with predefine username and password. User no need to manually type-in while install. No need user interaction whatsoever with the mysql database setting. My question is:
1. How to do that?
2. Do i need to install mysql server as prerequisite in every client or just the mysql odbc as prerequisite, or both?
In order to achieve this you should add both, "MySQL Server" and "MySQL Connector/ODBC" setups, as prerequisites to your project. Just go to "Prerequisites" page and add our "MySQL Server 5.5" predefined prerequisites to your setup project. To install silently the "MySQL Server 5.5" prerequisite setup you should add the /quiet command in the "Install Command Lines" fields from the "Setup Files" tab of your prerequisite.

To add the "MySQL Connector/ODBC" setup as a prerequisite to your project just download it from the "MySQL website" and add it on "Prerequisites" page by using "New Package Prerequisites" context menu option. Then, in order to install it silently use the /quiet command in the "Install Command Lines" fields from the "Setup Files" tab of your prerequisite.
3. I'd like to assign user security in some IIS website folders and files which of course the IIS will be installed as windows feature bundle. When I assign the user (actually an application pool) in the 'files & folders' section and run the installer, it got failed with error saying that user don't exist/can't applied or something like that. It seems that the security applied before the files & folders being install, and before the user created (because I create application pool for IIS and like to grant it security to access some folders & files). How to solve this?
In order to have a clear view of your installation scenario,can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com?
4. Let say I have website root in: \root and an upload folder: \root\upload. I'd like to add ftp access using port 21 and give authority to read \root and read&write to \root\upload. I can set this in IIS manager, but how do it with advanced installer?
You should add your "root" website in our "IIS" page. Next you should go to "FTP Access" tab and configure it accordingly. Then, you should add the "upload" folder as a virtual directory or web application under the above website and also configure it from its "FTP Access" tab.

Also, you can take a look on our "IIS Tutorial".

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
supermario
Posts: 7
Joined: Mon Nov 03, 2014 11:37 am

Re: MySQL configuration and installation

Hi Dan,

Thanks for the explanation.
Now I have some more question regarding the prerequisite:
1. How the work flow for prerequisites section. Is it install the pre-install first, then featured based, then chained, then post-install, then windows featured, then windows server roles? Or all of them run asyncronusly?
2. I need to install IIS, so it must be in windows featured. But I need to install some IIS microsoft web platform in exe files right after IIS installed. So where I can put these exe files to be executed?
3. I'd ike to set mysql configuration with command line right after mysql installed. How i can do it? Can i put cmd.exe or .bat file as prerequisite and put some command lines to it?

Thanks Daniel!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MySQL configuration and installation

Hello,
1. How the work flow for prerequisites section. Is it install the pre-install first, then featured based, then chained, then post-install, then windows featured, then windows server roles? Or all of them run asyncronusly?
The installation order is like this: pre-install prerequisites, then feature-based prerequisites, then Windows features and server roles, then the chained packages and post-install prerequisites.
2. I need to install IIS, so it must be in windows featured. But I need to install some IIS microsoft web platform in exe files right after IIS installed. So where I can put these exe files to be executed?
If you are using a custom action to launch the related EXE files, then your custom action should be scheduled after "Install Execution Stage -> Add Resources" action group as defereed.
3. I'd ike to set mysql configuration with command line right after mysql installed. How i can do it? Can i put cmd.exe or .bat file as prerequisite and put some command lines to it?
For this you can use a custom action scheduled after "Install Execution Stage -> Add Resources" action group as defereed. For example, you can add your BAT (e.g. config.bat) file as a temporary file in "Files and Folders" page and, then use a predefined "Launch file" custom action to launch your temporary BAT file. Just add the BAT file reference (i.e. [&config.bat]) in the "File to launch" field of your custom action.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
supermario
Posts: 7
Joined: Mon Nov 03, 2014 11:37 am

Re: MySQL configuration and installation

Hi Dan,

Thank you :)
It works great...!

I have more question about how to import .sql file to mysql server.
I config mysql and create user via using custom action after 'add resources' section. And I am thinking to import the .sql via custom action also. But I wonder if you have another better alternative.

I see the Server->SQL database section to play with. How it works? will it run after or before the custom action I created (since I config mysql through custom action) ?
Thank you.
supermario
Posts: 7
Joined: Mon Nov 03, 2014 11:37 am

Re: MySQL configuration and installation

Hi Dan,

I have 1 more question:
I create a "Launch File" in custom action with the following field value:

File to Launch: [SystemFolder]inetsrv\appcmd.exe
Command Line: set config "WCF" -section:system.ftpServer/security/authorization /-"[accessType='Allow',users='*']" /commit:apphost

I have problem with the command line with square bracket. Since it is being used by advanced installer for internal identifier, it got strip off when running (I look at on the verbose log all text within bracket strip off). How do I escape this bracket/solve this?

Thanks Dan!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MySQL configuration and installation

Hello,
I config mysql and create user via using custom action after 'add resources' section. And I am thinking to import the .sql via custom action also. But I wonder if you have another better alternative.

I see the Server->SQL database section to play with. How it works? will it run after or before the custom action I created (since I config mysql through custom action) ?
Yes, you can use our "SQL Databases" support to run your SQL scripts. All SQL Scripts added in our "SQL Databases" page are executed during the "Install Execution Stage -> Add Resources" actions group. So, if you need to run your custom before the SQL Scripts execution you should just move it before "Install Execution Stage -> Add Resources" actions group (at this stage the pre-install and feature-based prerequisites are already installed).
I have problem with the command line with square bracket. Since it is being used by advanced installer for internal identifier, it got strip off when running (I look at on the verbose log all text within bracket strip off). How do I escape this bracket/solve this?
In order to escape the square bracket characters you should enclose them between [\ and ]. So, the opening square bracket will be escaped like this:

Code: Select all

[\[]
If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
supermario
Posts: 7
Joined: Mon Nov 03, 2014 11:37 am

Re: MySQL configuration and installation

Thanks Dan!

I finally make it work!
And now I face different problem. I think I will create a new thread for this.
Thank you.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MySQL configuration and installation

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”