Select a documentation version: <button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">18.4.0</button>

- [Current (18.4.0)](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/connect.md.txt)
- [18.4.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.4.0/docs/connect.md.txt)
- [18.3.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.3.0/docs/connect.md.txt)
- [18.1.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.1.0/docs/connect.md.txt)

<br />

This page describes how to connect to AlloyDB Omni after you deploy it using the RPM orchestrator.

<br />

Any client application that works with PostgreSQL can also work with AlloyDB Omni, with no modification needed.

To connect to your database cluster, use any PostgreSQL-compatible client, such as `psql`, that's installed on a client machine.

## Before you begin

- [Install AlloyDB Omni using the RPM orchestrator](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/install-components.md.txt).
- [Create an AlloyDB Omni cluster](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/create-cluster.md.txt).
- Make sure that you have the following connection information:

  - Host: the IP address of the database node. You can find the IP addresses of your nodes by [getting the cluster status](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/cluster-status.md.txt). If the HA is enabled for your cluster, follow the steps in [Verify read-only endpoints](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/manage-high-availability.md.txt#verify-read-only-standby-endpoints) to find the IP addresses of your endpoints.
  - Port: `5432`
  - Username: `postgres` or the administrative user you configured.
  - Password: the password for the administrative user that you configured when creating the cluster.

## Connect to a database node using psql

To connect to your database node, run the `psql` command from a client machine that has network access to the database node.

1. Run the following command:

   ```bash
   psql -h NODE_IP_ADDRESS -p 5432 -U postgres
   ```

   Replace `NODE_IP_ADDRESS` with the IP address of the database node.
2. When you're prompted, enter the password for the `postgres` user.

## Connect through a connection pooler

If you configured PgBouncer, you can connect to the cluster through the connection pooler. For more information, see [Verify the connection pooler](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/use-pgbouncer-connection-pooler.md.txt#verify-connection-pooler).

## Connect using your own applications

Any client application that works with PostgreSQL can also work with AlloyDB Omni, with no modification needed.

Use any PostgreSQL-compatible client or code library to connect to AlloyDB Omni.

After you connect to the database server, you can define, query, and modify your databases by sending DML and SQL queries through standard PostgreSQL communication protocols.

Because AlloyDB Omni runs in your own environment, you can control how you connect to AlloyDB Omni. You can allow or restrict network access to AlloyDB Omni according to the needs of your application, just as you would with an ordinary PostgreSQL server.