splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Run SQL Script After ODBC and database install

Hi Guys,

I am installing MySQL 5 by copying the files into a folder, creating the service, starting the service and then adding the MySQl connector driver.

I also want to run an sql script on that database when its running.

I have added the script in the SQL Scripts section of Advanced Installer but when I run, it tries to run the script before the mysql serice has started and before the ODBC driver has been installed.

Is there a way to delay the sql script untill after the database and driver has been installed?

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Run SQL Script After ODBC and database install

Hi,

Unfortunately Advanced Installer does not support running an SQL script in the same installation which installs the driver used for the SQL connection. However, you can try creating a separate package for the ODBC driver and adding it as a prerequisite to the main package (the one which runs the SQL script). Please note that the User Guide contains a prerequisite tutorial which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Re: Run SQL Script After ODBC and database install

Thats great Cosmin,

So, if I do that will the SQL script run after the ... File copying, Service Creation and Service Start???

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Run SQL Script After ODBC and database install

Hi,

If the service is installed and started by the prerequisite package, then the SQL Script will run when you need (it will run in the second install process). However, if the service is installed by the same package which runs the script, the script will run before the service is installed.

Please note that the SQL script will always run after the files are installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”