Solved

making a trigger in mysql fire a shell command

Posted on 2008-10-18
5
1,417 Views
Last Modified: 2008-11-21
Hi,

I would like to have a trigger execute a shell command (like "php myscript.php") when some record is modified.
0
Comment
Question by:siranm
5 Comments
 
LVL 1

Expert Comment

by:hakkekushou
ID: 22751210
It cannot be done unless you are using the mysql command line client where you would just use \! before the command however that is only a feature of the command line client and not the server. MySQL developers state that it will be some time until they add that feature de to the mass amounts of platforms they support.
0
 
LVL 3

Author Comment

by:siranm
ID: 22752310
I was able to do it on PostgreSQL.... I had to write the trigger in C languge...

Can I write triggers in C language in MySql ?
0
 
LVL 22

Accepted Solution

by:
earth man2 earned 500 total points
ID: 22767040
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now