MySQL Forums
Forum List  »  Triggers

script shell trigger
Posted by: Ayoub Abid
Date: August 02, 2013 01:09AM

Hello,

I want to run a shell script, when a new row is added to the data base.

How should i do that ?

i have tried to make the folowing trigger :

drop trigger if exists block_action;

delimiter ;;
CREATE trigger block_action before insert ON data
FOR EACH ROW
Begin
DECLARE result CHAR(255);
set result = sys_exec('/usr/local/snort/bin/script');
END;;

But i get nothing. I should normally have a message on the screen.

So how can i solve that ? or are there other solutions ?

Regards,
Abid

Options: ReplyQuote


Subject
Views
Written By
Posted
script shell trigger
2144
August 02, 2013 01:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.