---
title: 连接数据库
description: "如果需要使用SQL命令进行查询、更新、删除等操作，需要连接到数据库。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/Greenplum/kunpenggreenplum_03_0015.html
sourcePath: /source/zh/kunpengdbs/ecosystemEnable/Greenplum/kunpenggreenplum_03_0015.html
indexId: 6dd00efa363eeffbc9832de5b7de134c274162f83b5cef947673a38a70693d8877
---
# 连接数据库

如果需要使用SQL命令进行查询、更新、删除等操作，需要连接到数据库。

postgres是安装Greenplum时默认创建的数据库，通常用于系统管理和维护。

连接postgres数据库。```
psql -d postgres
```
