Mysql – How to call a windows program in thesql prompt in windows

MySQLmysql-workbenchwindows

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.

Best Answer

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).