> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 关闭数据库

## 指令说明

**描述：** 关闭已连接的数据库

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/database/images/closedatabasecommand-02.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=deed003c6ee37b076d3893d0026e7711" alt="关闭数据库指令参数面板" width="648" height="243" data-path="helpcenter/commands/database/images/closedatabasecommand-02.png" />

    | 参数        | 说明            |
    | --------- | ------------- |
    | **数据库对象** | 选择已经创建好的数据库对象 |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/database/images/closedatabasecommand-01.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=7b1638696002bef99b22516908899723" alt="关闭数据库使用示例" width="849" height="198" data-path="helpcenter/commands/database/images/closedatabasecommand-01.png" />

**该流程执行逻辑：**

使用【连接数据库】配置Mysql连接，创建数据库对象，并保存到数据库对象

使用【打印日志】打印数据库对象消息日志

使用【关闭数据库】指令关闭数据库连接

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/database/images/closedatabasecommand-03.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=5b147bfabcc565ae2c5c33f628aad970" alt="关闭数据库效果展示" width="850" height="247" data-path="helpcenter/commands/database/images/closedatabasecommand-03.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
