How to Grant Privileges for MySql(it's a prerequisite)? - 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!

Filos
Posts: 8
Joined: Tue Mar 16, 2010 9:02 am

How to Grant Privileges for MySql(it's a prerequisite)?

Hello,

i have installed the MySql through advanced installer and my script (that creates the tables i need) can not be executed because the MySql demands to Grant All Privileges for the user root@locahost.
I know what i have to write to give all privileges to the user but i don't know how to do that through advanced installer.
Do you have any idea? Should i create another script to achieve that?
I would really appreciate your help.

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to Grant Privileges for MySql(it's a prerequisite)?

Hello,

The error you are encountering is because you are running the scripts under a MySQL user which does not have the right privileges necessary to create tables.
You can either give 'root' all privileges from your MySQL admin panel, or you can select another user to execute the SQL script under, making sure that user has the proper privileges. Note that the MySQL panel is not part of Advanced Installer, this configuration needs to be done on your server.

Selecting which user to execute the scripts under is done from Advanced Installer->SQL Scripts page. Simply select your connection and configure the "Authentication" section as needed.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Filos
Posts: 8
Joined: Tue Mar 16, 2010 9:02 am

Re: How to Grant Privileges for MySql(it's a prerequisite)?

Sorry if there is something i can not understand but
I have already set a username and a password(" root " and " ******** " respectively).
During the installation at the time of script's execution i get this error: Access denied for user root@localhost.
As i have searched this means that i should grant all privileges for the user.
I have done this through MySql admin panel and everything worked fine.
The problem is that i want do that automatically within advanced installer and not through MySql admin panel.
Is there any way to achieve that?

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to Grant Privileges for MySql(it's a prerequisite)?

Hello,

For mysql, you have the mysqladmin command line utility which can be called by a custom action, perhaps a "Launch File or Open URL" custom action. Use that utility in your installer to grant privileges as needed.
For the documentation, please see the following page:
http://dev.mysql.com/doc/refman/5.1/en/mysqladmin.html

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”