I need to give an user TRIGGER permission for an whole schema in mysql to import mysql workbench backup.
I tried with:
grant trigger ON `schemaname`.* TO `user`@`localhost`
ERROR 1142 (42000) at line 53: TRIGGER command denied to user 'user'@'localhost' for table 'table'
From MySQL Docs
In MySQL 5.0 CREATE TRIGGER requires the SUPER privilege.
So you need to give SUPER privileges to the User. While importing, there will be command like "Create Trigger..." which is throwing an error.
Check your MySQL version and definer value as well for trigger in the importing file.
Edit: For version 5.1, follow MySQL docs, that says:
CREATE TRIGGER requires the TRIGGER privilege for the table associated with the trigger. The statement might also require the SUPER privilege, depending on the DEFINER value, as described later in this section. If binary logging is enabled, CREATE TRIGGER might require the SUPER privilege, as described in Section 19.7, “Binary Logging of Stored Programs”. (Before MySQL 5.1.6, there is no TRIGGER privilege and this statement requires the SUPER privilege in all cases) The DEFINER clause determines the security context to be used when checking access privileges at trigger activation time.
So, you need to check Definer value for importing trigger. It might have something like :
DEFINER = root. Try removing the definer then try importing. Hope it works...