从MySQL客户端中执行shell命令? [英] Execute shell command from within a MySQL client?

查看:492
本文介绍了从MySQL客户端中执行shell命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在oracle数据库中,命令"host"可用于从数据库命令窗口运行bash命令.在mySql中是否有与主机"等效的命令?

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?

推荐答案

您可以使用 system 命令.

You can use the system command.

系统命令,\!命令

system command, \! command

使用您的命令执行给定命令 默认命令解释器.

Executes the given command using your default command interpreter.

system命令仅在Unix中有效.

The system command works only in Unix.

示例:

system ls -l

这篇关于从MySQL客户端中执行shell命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆