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?
A:
I don't believe there is a simple way to do it. I cannot guarantee there isn't some hack to do it though.
The only scripts mysql will let you run from within sql is another .sql script.
Kazar
2009-05-30 08:39:07
+4
A:
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
Ayman Hourieh
2009-05-30 08:41:08
Of course this only works in the MySQL command-line client. Not from the database server itself.
Peter Stuifzand
2009-05-30 11:06:33
A:
It's actually possible to execute shell commands on the server that mysqld is running though a client connection (rather than executing commands on the client machine locally) by using MySQL Proxy (scroll down to the "Shell commands from MySQL client" section ).
ʞɔıu
2009-05-31 02:29:26