Trigger Mysql

santovito

Verified User
Joined
Nov 23, 2008
Messages
143
Hello,

a my client has attempted to create Triggers but phpmyadmin returns this error:

" #1227 - Access denied; you need the SUPER privilege for this operation "

how can I do to enable the creation of Triggers?
the creation of Triggers by customers is ok or it may cause problems with security?

thanks.

Vito
 
So how do we get the user privileges to enable triggers, and views??? The user privileges screen does not show such items. There is the same issue with cpanel, but I had hoped for better with directadmin :(
 
you can adjust the user permissions via ssh or via phpmyadmin for advanced permissions.
 
And how do I do that?

in phpmyadmin for a specific database, I have tried the following, and got permission denied

information_schema
update `USER_PRIVILEGES` set `PRIVILEGE_TYPE` = 'ALL'
- I only had one user in there
 
And how do I do that?

in phpmyadmin for a specific database, I have tried the following, and got permission denied

information_schema
update `USER_PRIVILEGES` set `PRIVILEGE_TYPE` = 'ALL'
- I only had one user in there

You need to make sure you have are using an account that has authority to issue permissions.
 
Instead of running an SQL query use phpMyAdmin's own interface to users and permissions, go into the "Privileges" tab.
 
Hi Tillo,

Got a customer asking for this also. Is this secure to allow a user these types of permissions in a shared hosting server ?

Thanks for helping :)
 
Absolutely not: the SUPER privilege allows the user to do a LOT of bad things, including taking complete privileged access to the server (root).

Starting with MySQL v5.1, there is an additional TRIGGER privilege that avoids the need of the SUPER privilege to create triggers. This one is safe.
 
Excellent,

So we just need to upgrade to the version. Thanks for the securty tip and for having such great knowledge and sharing it with others :)
 
You are welcome, glad to be of help.
I strongly believe in information sharing :) everything I know comes from sources like me -- I'm just giving it back.
 
Do you have a dedicated server?
Do you have a master login for the server?

ie
username: da_admin
password: same as your root/admin passwords???

When I access phpmyadmin using the above, I can see all the databases, and I have access to the mysql table.

I can see each of the user permissions on the db table - I can see that the users each have Trigger_priv, and Create_view_priv

So while the directadmin control panel only mentions a few privileges, the full range are able to be accessed via phpmyadmin with the master user access.
 
I would like to give grant trigger to normal user on mysql 5.0.51a

but in mysql console could not run this command ,

Have you ever create trigger for normal user ?
 
I also can not create a Trigger on MySQL 8.0, just show the same problem:
TRIGGER command denied to user 'XXXXX'@'localhost' for table 'table_name'

anybody have a solution?
 
Back
Top