5

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.

2
  • What would be the use case for this? This is crossing domains that in my opinion shouldn't be crossed. Commented Dec 5, 2012 at 18:11
  • there is a event_shceduler in mysql by useing that i want run event_shcduler in mysql periodically along with calling the external scripts , Even i know cron job in linux and winwods scheduler , Commented Dec 5, 2012 at 18:16

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.