Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-06-18
3
Medium Priority
?
2,527 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 2000 total points
ID: 16931916
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 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