Problem connecting to mysql - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

cakrit
Posts: 2
Joined: Fri Feb 01, 2013 2:55 pm

Problem connecting to mysql

Hello, I'm trying out advanced installer and it looks great. I've spent some time with it and I have encountered a couple of issues with the SQL scripts.
I have set up the mySQL driver, the connection etc. just fine. I have custom actions to start and stop the mysql server during the installation. (Add Resources->start Finish Execution->stop). Between the two, the SQL scripts are executed.

Issue 1:
The behavior is different between two Windows 7 PCs. On one of them, the installation goes smoothly and the scripts are executed without any errors. On the other, I get a connection error from mySQL: Access denied to 'root'@'localhost' (Using password: NO). This is the message one gets when trying to connect to a running mysql server without providing a password. Both PCs have the exact same mySQL version and the driver is included in the installation package. I re-entered the password three times in advanced installer, just to be sure, but again, it does work on the first PC, just not on the second. I reinstalled mysql on the second PC several times, but it does sound like a mysql client issue. Do you have any idea why that might happen;

Issue 2:
I have configured the SQL script to abort the installation upon failure. At that point, I want to execute the custom action to stop the mysql server. My stop script is configured for 'immediate' execution, so I created another action called stop_rollback, with "Execution Time" "During Installation Rollback". I did not know where to put the action, so I placed it under "Add Resources", beneath the start action. When I get a mysql error and the installation is rolled back, stop_rollback is not executed and the mysql server remains active. What have I done wrong here?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem connecting to mysql

Hi and welcome to our forums,

Thank you for your interest in Advanced Installer.

1) I am not sure why this is happening, since the machines are configured identically it should work for both of them. Can you please create verbose logs for both of the installs and compare them, eventually send them to us so we can have a look too.

2) You need to have the custom action scheduled to execute before the SQL scripts are executed. We handle the SQL scripts with our own internal custom action which is executed as part of the "Add Resources" step. Can you try to move the custom action before the "Add Resources" group and try the package one more time?

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cakrit
Posts: 2
Joined: Fri Feb 01, 2013 2:55 pm

Re: Problem connecting to mysql

Thanks for the prompt response. The rollback worked like a charm.

I traced the other issue to the mySQL ODBC driver installation (on the second PC it wasn't installed). Uninstalling the driver on the first PC returned a different connection error, but I eventually gave up. I think that this whole ODBC driver thing is a huge overkill and it limits the statements you can execute anyway. I will simply add custom actions for the mysql command line and use the mysql 'source' command to execute the sql scripts I need to run.

Return to “Common Problems”