Hi!
I am not allowed to use TRIGGERs on my database.
If I execute the following code (from http://dev.mysql.com/doc/refman/5.1/...trigger.html):
Code:
CREATE TABLE test1(a1 INT);
CREATE TABLE test2(a2 INT);
CREATE TABLE test3(a3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE test4(
a4 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
b4 INT DEFAULT 0
);
delimiter |
CREATE TRIGGER testref BEFORE INSERT ON test1
FOR EACH ROW BEGIN
INSERT INTO test2 SET a2 = NEW.a1;
DELETE FROM test3 WHERE a3 = NEW.a1;
UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1;
END;
|
delimiter ;
INSERT INTO test3 (a3) VALUES
(NULL), (NULL), (NULL), (NULL), (NULL),
(NULL), (NULL), (NULL), (NULL), (NULL);
INSERT INTO test4 (a4) VALUES
(0), (0), (0), (0), (0), (0), (0), (0), (0), (0);
I'll get: "#1142 - TRIGGER command denied to user 'poc16'@'localhost' for table 'test1' "
Is it possible to GRANT all users of this hosting (So including me ) the TRIGGER privilege? TRIGGERs are really nice to use and I don't want to miss them.
Thanks in advance.
Jan