Run shell script command / from MySQL Trigger / Stored Procedure

I am currently writing my main assignment in my last semester in my research (IT-Engineering with Networking) and am currently working with MySQL.

My question is: is it possible to execute a Shell script / Command command from MySQL Trigger / Procedure? Or can this be done from a CASE statement? I searched the Internet and read that it was not practical. But I need a script to check the table in the database for warnings, and then warn people if there are any. If in any case this can be done, then I am open to ideas. Any input would be appreciated :)

+5
source share
1 answer

You can read this blog to run a shell script from MySQL: https://patternbuffer.wordpress.com/2012/09/14/triggering-shell-script-from-mysql/

I think for your requirement just write a python / php / perl script that will connect your MySQL database and request a table of warnings about any warning and, accordingly, will display a warning message on the screen or send an email / sms warning.

+6
source

All Articles