FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Cannot Create Triggers in MySQL at Frihost





mexiwithacan
When I try to create a trigger on a table, I encounter the following error:

MySQL said:
#1227 - Access denied; you need the SUPER privilege for this operation

Does anyone know of a way around this? Or is trigger creation a futile endeavor?
Bondings
You are the first to ask about it (at least that I remember). I've checked it out and it seems that an upgrade to MySQL 5.1 is needed for it, and maybe I'll need to manually add the permission to your database user (I'm not sure).

Unfortunately I don't have much time at the moment and a mysql upgrade will probably have to wait for a month or so unfortunately.
mexiwithacan
I read up a bit on the MySQL docs too, and I think you're right that an upgrade is necessary. Granting the SUPER privilege is too dangerous for such a simple request. Please keep us posted on upgrade plans! Thank you.
Bondings
I upgraded MySQL (and some other stuff) on server 4. Please check if it works now, otherwise I'll check if extra permissions are needed.
mexiwithacan
Hello, Bondings. I apologize for the very late response, considering that you upgraded the database almost immediately. The week's been pretty busy with respect to my day job, and I just returned from attending commencement for my sister-in-law 200 miles away.

Anyhow, I tried to write a simple trigger in my database as follows:

Code:
Create trigger testtrigger
before insert
on allowances
for each row
set @test=1


Unfortunately, while I am no longer told I need the SUPER privilege, I am still presented with an error: #1142 - TRIGGER command denied to user 'mexiwith_iledger'@'localhost' for table 'allowances'
mexiwithacan
I read through some more of the MySQL documentation, and I think perhaps I can get the access I need if you can execute the following statement for me on Server 4's MySQL instance:

Code:
GRANT TRIGGER
ON TABLE mexiwith_iledger.*
TO mexiwith_iledger


When I try to run that statement I get the following error: #1044 - Access denied for user 'mexiwith_iledger'@'localhost' to database 'mexiwith_iledger'
Bondings
I added the TRIGGER rights for your mexiwith_iledger user. Please check if it works fine. Very Happy

By the way, it is normal that you aren't allowed to set it yourself. The server wouldn't be very secure if the users would be able to set their own rights. Wink
mexiwithacan
Thanks a lot, Bondings! I can now create and drop triggers in my database. You're way faster than most support teams I've dealt with in my professional experience.

Regarding the privileges thing, while I understand why users shouldn't be allowed to modify permissions, I think it would make sense for the user who "owns" the database to be able to do everything that pertains to that specific database.

But most importantly, thanks again for your flash-fast help!
Bondings
mexiwithacan wrote:
Regarding the privileges thing, while I understand why users shouldn't be allowed to modify permissions, I think it would make sense for the user who "owns" the database to be able to do everything that pertains to that specific database.

It's a new MySQL feature. I assume that's why DirectAdmin hasn't added that privilege yet.
cr3ativ3
Bondings wrote:
I added the TRIGGER rights for your mexiwith_iledger user. Please check if it works fine. Very Happy

By the way, it is normal that you aren't allowed to set it yourself. The server wouldn't be very secure if the users would be able to set their own rights. Wink


I'm not 100% sure as to how/what "Trigger" does but perhaps you could run a command to give the same privilege to all MySQL users, so in the future people using it do not run into the same issue? If you haven't already made it global.

I am not sure as to what MySQL command would be used to achieve this. Then again it may be futile as any new users will also need the permissions added to them, which would probably require DirectAdmin to update their software, and then have it deployed.

Just a thought though.
Bondings
cr3ativ3 wrote:
Bondings wrote:
I added the TRIGGER rights for your mexiwith_iledger user. Please check if it works fine. Very Happy

By the way, it is normal that you aren't allowed to set it yourself. The server wouldn't be very secure if the users would be able to set their own rights. Wink


I'm not 100% sure as to how/what "Trigger" does but perhaps you could run a command to give the same privilege to all MySQL users, so in the future people using it do not run into the same issue? If you haven't already made it global.

I am not sure as to what MySQL command would be used to achieve this. Then again it may be futile as any new users will also need the permissions added to them, which would probably require DirectAdmin to update their software, and then have it deployed.

Just a thought though.

I'm hoping for DirectAdmin to do it. At least there are a few topics asking about it on their forums.
Navigator
Bondings wrote:
I added the TRIGGER rights for your mexiwith_iledger user. Please check if it works fine. Very Happy

By the way, it is normal that you aren't allowed to set it yourself. The server wouldn't be very secure if the users would be able to set their own rights. Wink


Hello Bondings, I would like to have the same trigger permissions as the OP. I am building a test site on my frihost.org site and if everything goes well we'll add the main site also.

Cheers
Related topics
help
have problem on my sql
easyphp help 4 total noob - take 1 second of your time plz
AJAX tutorial [2nd part now updated]
NEED HELP IN VIEWS AND TRIGGERS
PhpNuke Installation Tutorial
...
Simple MySQL Template
MySQL [php Mail()] and FriHost Mass mail rules
Can I install Magento on frihost?
i cannot create database in frih
delete and create
Please help
Can someone create a mysql user for me on my website?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.