I want to call an OS level commands from mysql prompt within Windows command line tool.
In Unix* there is a system command available to execute OS commands within MySQL prompt.
Any way of dong the same in windows or even in workbench as well?
The objective is to invoke a OS command within a mysql prompt.
1 Answer 1
(削除) You cannot run OS commands in a MySQL CLI nor in MySQL Workbench. Why would you do that (except for trying to hack a machine via an SQL connection)? (削除ここまで) If you need to run an OS command, open a normal shell window (that still stands).
Update: The system command only works on Unix like OSes (http://dev.mysql.com/doc/refman/5.6/en/mysql-commands.html), e.g. Linux + Mac.
MySQL Workbench doesn't support most of these CLI commands however (use
and delimiter
are 2 that are supported).
-
what could i do if i need to call a OS command within procedure execution..Nawaz Sohail– Nawaz Sohail2014年12月16日 08:51:21 +00:00Commented Dec 16, 2014 at 8:51
-
You simply can't. It's not allowed, certainly for security reasons.Mike Lischke– Mike Lischke2014年12月16日 11:32:48 +00:00Commented Dec 16, 2014 at 11:32
-
if so then why it is allowed in UNIX* OS?..Nawaz Sohail– Nawaz Sohail2014年12月16日 11:33:57 +00:00Commented Dec 16, 2014 at 11:33
-
1I think with "that stands still" you actually mean "that still stands". "That stands still" means "it's not moving"...user1822– user18222014年12月16日 15:03:53 +00:00Commented Dec 16, 2014 at 15:03
-
any workaround to achieve the goal @a_horse_with_no_name ?Nawaz Sohail– Nawaz Sohail2014年12月16日 15:33:24 +00:00Commented Dec 16, 2014 at 15:33
system
code into it.