how to create trigger without SUPER privilege in mysql

maliawan
maliawan used Ask the Experts™
on
how to create trigger without SUPER privilege in mysql ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
how to create trigger without SUPER privilege in mysql ? my mySQL version is 5.0.91mm-log
As of MySQL 5.0.16 you can do the following:

Add the following line to your my.cnf or my.ini file and reboot your MySQL server:

# Set option to allow for functions to be created
log_bin_trust_function_creators = 1

As stated in the documentation:
"To relax the preceding conditions on function creation (that you must
 have the SUPER  privilege and that a function must be declared
 deterministic or to not modify data), set the global
 log_bin_trust_function_creators  system variable to 1. By default,
 this variable has a value of 0, but you can change it".

Author

Commented:
Please note that i have a shared hosting and i don't have SUPER access to the server because of shared hosting.
Ask the sysadmin for the shared service to add the
   log_bin_trust_function_creators = 1

to their configuration file so that all their clients can create their own functions.

There is no other way I know of to do functions, triggers, etc. in MySQL without
needing SUPER access.

Author

Commented:
partially work

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial