Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger not created in Mysql

I have created one user in cpanel and DB and gave ALLPRIVILEGES to that user and tried to import sql dump which results "TRIGGER command denied to user 'test'@'localhost' for table 'tablename'" .But it works in my local.What i done wrong on this process? .kindly help me.

like image 755
mymotherland Avatar asked Aug 04 '11 10:08

mymotherland


1 Answers

Error says that user 'test'@'localhost' misses TRIGGER privilege. Check granted privileges with 'SHOW GRANTS' command, it will show privileges for current user.

To grant this privilege at global level execute this statement -

GRANT Trigger ON *.* TO 'test'@'localhost'

or at object level (for specified table) -

GRANT Trigger ON TABLE database_name.tablename TO 'test'@'localhost'
like image 163
Devart Avatar answered Sep 22 '22 22:09

Devart