pejman taghipoor
Posts: 1
Joined: Mon May 21, 2012 9:22 am

Install and configure mysql

hello.
i want install and configure MySql server.
i add MySql.exe to Prerequisites.
it's work but manually.and i should config it.
and i should add my data base with MySqlTools(such MySQL Administrator,navicat).
how i do install And configure and add my dataBase?
(i use advanced installer ver.8).
Please help.
whistle
Posts: 4
Joined: Sat May 19, 2012 12:21 pm

Re: Install and configure mysql

Hi,

To install mysql server , you can use the following commandline:
mysqld.exe" --install "ServiceName" --defaults-file="path\my.ini"
in this case ,mysql is a service and it will be started automatically.

To create database and add some data to the mysql, you can use the following commandline:
mysql.exe -f -h localhost -u root -p password < data.sql

the password should be your mysql password.
the data.sql is some sql command that can create database and insert data to the mysql, and it can be created by navicat and others.

all of above is my understanding , I hope that can be used to help to you.

Note: I 'm not the administrator and the engeer, it just be my words.

all the best
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Install and configure mysql

Hi,

If you want to install and configure automatically your MySQl Server and execute SQL Scripts please follow the next steps:

1. Add MySQL Server Setup as a prerequisite for your package from Prerequisite page.
2. In order to install MySQL Server Setup silently, you can use a custom command line (/qb) in the "Install Command Lines" fields" from "Prerequisites page -> Prerequisite Setup File tab".

Please note, when MySQL is installed silently, MySQL service is not installed. The MySql service can be installed as service using the next command line:

Code: Select all

mysqld --install
For starting the service you can use the next command line:

Code: Select all

NET STAT mysql
For executing this commands lines using Advanced installer you have to follow the next steps:
1. Go to "Custom Actions" page and create a new "Launch EXE with working directory" custom action with sequence under the "Install Execution Stage -> Searches" action group like this:
  • File Path: mysqld
    Command: --install
    Working: Path to mysql\bin\
2. Add a new "Launch file" custom action with sequence, scheduled after the above one, like this:
  • File To Launch: cmd.exe
    Command Line: /c NET START mysql
    Working Directory:
    Run as Adminsitrator: checked
For configuring the MySQL Server you can use a BAT file as a custom action after MySQL server is installed.

For execution of SQL Scripts Files you cand use SQL Databases feature.
Please note that the User Guide contains a SQL Scripts tutorial which may help you.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nicko
Posts: 1
Joined: Fri Jun 07, 2013 6:49 am

Re: Install and configure mysql

hello,
I am a beginner in Advanced Installer, I follow this steps in creating my installer with mysql and I got this problem "directory manager not initialized". so I searched for the solution for this
problem. I sequenced the custom action after the cost initialized. after building and running the installer, I got this error "target paths not created. No path exists for entry APPDIR in Directory table". any help please. I had trouble fixing this error.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install and configure mysql

Hello,

I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Also, can you please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
@clyde
Posts: 5
Joined: Wed Oct 05, 2016 8:44 am

Re: Install and configure mysql

Hi. I'm having problem in executing mysqld.exe --install. I'm using launch exe with working directory.
Attachments
Mysql repackage.aip
(125.49 KiB) Downloaded 630 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install and configure mysql

Hello,

I think this happens because you are executing your "LaunchExeWithDirectory" custom action as "Immediately". Can you please set, in "Custom Actions" page, its execution time to "When the system is being modified (deferred)" and see if this helps?

Please note that all files that you add in "Files and Folders" page will be installed during "Add Resources" action group on the deferred stage of the install execution.

Also, as a side note, please take a look on our "How to install mysql server 5.0 and Connector silently" and "MySql server installation fails with MySQLInstallerConsole as custom action" threads to check other ways to configure the newer MySQL server versions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: Install and configure mysql

how to install MySQL service with another display name?


CiprianComsa wrote:Hi,

If you want to install and configure automatically your MySQl Server and execute SQL Scripts please follow the next steps:

1. Add MySQL Server Setup as a prerequisite for your package from Prerequisite page.
2. In order to install MySQL Server Setup silently, you can use a custom command line (/qb) in the "Install Command Lines" fields" from "Prerequisites page -> Prerequisite Setup File tab".

Please note, when MySQL is installed silently, MySQL service is not installed. The MySql service can be installed as service using the next command line:

Code: Select all

mysqld --install
For starting the service you can use the next command line:

Code: Select all

NET STAT mysql
For executing this commands lines using Advanced installer you have to follow the next steps:
1. Go to "Custom Actions" page and create a new "Launch EXE with working directory" custom action with sequence under the "Install Execution Stage -> Searches" action group like this:
  • File Path: mysqld
    Command: --install
    Working: Path to mysql\bin\
2. Add a new "Launch file" custom action with sequence, scheduled after the above one, like this:
  • File To Launch: cmd.exe
    Command Line: /c NET START mysql
    Working Directory:
    Run as Adminsitrator: checked
For configuring the MySQL Server you can use a BAT file as a custom action after MySQL server is installed.

For execution of SQL Scripts Files you cand use SQL Databases feature.
Please note that the User Guide contains a SQL Scripts tutorial which may help you.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install and configure mysql

Hello and welcome to our forums,

Can you please try the approach I exposed on "How to install mysql server 5.0 and Connector silently" thread?

Just change the value set to the "ServiceName" command line parameter from step 4.

Let us know if this helped, otherwise please give us more details about your requirements.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: Install and configure mysql

thank you
Daniel wrote:Hello and welcome to our forums,

Can you please try the approach I exposed on "How to install mysql server 5.0 and Connector silently" thread?

Just change the value set to the "ServiceName" command line parameter from step 4.

Let us know if this helped, otherwise please give us more details about your requirements.

All the best,
Daniel
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install and configure mysql

You are always welcome.

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

Return to “Common Problems”