I know that I'm probably looking for a security hole, but since I managed to do this in Oracle and SQL Server, I will give him a chance:
I am looking for a way to execute a shell command from a SQL script in MySQL. If necessary, you can create and use a new stored procedure.
Note. I'm not looking for the SYSTEM command that the mysql command-line tool offers. Instead, I am looking for something like this:
START IF COND1 ... EXEC_OS cmd1; ELSE EXEC_OS cmd2; END
where EXEC_OS is the method to call my code.
Moshe source
share