Solved

MySQL trigger - can I have it execute a shell script on the system

Posted on 2006-06-18
3
2,372 Views
Last Modified: 2012-08-14
I need MySQL to execute a SHELL script (not a sql script) on the system when a trigger is "fired". Is this possible? And if so, please...tell me how!

0
Comment
Question by:Neil2526
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 16931672
A trigger event can only be an insert, update or delete statement. AFAIK it cannot invoke with external processses.

If you need to interact with the system outside of the SQL domain, I would suggest some type of script (Perl,PHP etc). From here you can do all your normal program and system type functions, plus database interaction.
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16931915
I would imagine it is possible if you were to write a User Defined Function in C/C++ and called it from the trigger.  In terms of MySQL itself providing native functions to invoke a shell script (regardless of whether you want to execute inside the context of a trigger or not), there is no such functionality.
0
 
LVL 30

Accepted Solution

by:
todd_farmer earned 500 total points
ID: 16931916
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question