mysql shell命令
时间: 2023-08-27 10:21:12 浏览: 163
mysql 命令
执行mysql命令的shell命令有几种不同的方式。
方法一是使用以下命令格式:
```
mysql -hhostname -uuser -ppassword -e "mysql_cmd"
```
其中,`hostname`是MySQL服务器的主机名,`user`是用户名,`password`是密码,`mysql_cmd`是需要执行的MySQL命令。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Shell篇之shell脚本中执行mysql相关指令](https://blog.csdn.net/xu710263124/article/details/119763292)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [shell 环境下MySQL的基本操作指令总结](https://blog.csdn.net/azagj28208/article/details/101806233)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文