neotam
neotam

Reputation: 2731

how to run the python script from the mysql query?

I have a desire to call the python script from the mysql query.

like we call the procedure in mysql : call procedurename();

just like as above is there any way in mysql to call external scripts like ,

                       call script(somefile.py) 

i wrote the above thing to explain the exactly what i want.

Upvotes: 5

Views: 6073

Answers (1)

Marwan Alsabbagh
Marwan Alsabbagh

Reputation: 26788

This does not seem to be possible in MySQL, for security reasons. You can have a look at this related question Executing shell command from MySQL. You can however do this in other database like oracle. In Postgresql there is also support to create python stored procedures in the database. You could use this technique to have your database triggers run python code.

Upvotes: 4

Related Questions