Solved

making a trigger in mysql fire a shell command

Posted on 2008-10-18
5
1,420 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 67
Remote desktop Ubuntu from Windows 10 5 65
windows 7 starter missing password 21 78
two ways encryption with php 3 28
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

831 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