Progress Programmer Progress Programmer - 4 months ago 20
SQL Question

Execute shell command from within MySQL client?

In oracle database, command "host" can be used to run bash command from database command window. Is there a equivalent command as "host" in mySql?

Answer

You can use the system command.

system command, \! command

Executes the given command using your default command interpreter.

The system command works only in Unix.

Example:

system ls -l
Comments