0
mysql > path_to_bin/name.exe

Is there a solution?

user198729
  • 61,774
  • 108
  • 250
  • 348
  • The 'mysql > path_to_bin/name.exe' suggests you want to overwrite a (binary) file with the text output from mysql, which doesn't make sense. The following text 'Is there a solution' is pretty vague. If you are that imprecise, it would probably not be useful to go into a discussion of UDFs. – gary Jan 14 '10 at 16:35
  • I need a solution pretty much like JohnK813's,but should also work with windows platform. – user198729 Jan 14 '10 at 16:42

2 Answers2

3

No, that would be a huge security risk.

Filip Ekberg
  • 36,033
  • 20
  • 126
  • 183
  • select * from puppies - "Are you sure you want to delete all files on your computer?" – Hamish Grubijan Jan 14 '10 at 15:59
  • There are other ways to solve something similar, if you really need to run programs, use a scheduler or something, but execution directly from sql? Let's just hope that's a "feature" that will never be done. – Filip Ekberg Jan 14 '10 at 16:01
2

You can use \! on the Linux side to execute simple shell commands, but

  1. I can't say for certain that this will work on the Windows side, and
  2. I agree with Filip's answer that there are inherent risks in doing this.

Source

JohnK813
  • 1,134
  • 7
  • 13