This page describes how to run and connect to AlloyDB Omni after you install it on your own machine.
Before you begin
Install AlloyDB Omni on your system .
Run AlloyDB Omni
Use the information in the following sections to start, check the status, and stop AlloyDB Omni.
Start AlloyDB Omni
sudo
systemctl
start
alloydbomni17
Optional: Enable automatic service restart
To enable automatic restart of the AlloyDB Omni service, do the following:
-
Add the following configuration to the
/etc/systemd/system/alloydbomni17.service.d/override.conffile.[ Service ] Restart = on-failure -
Reload the
systemdmanager configuration and restart thealloydbomni17service for the changes to take effect.sudo systemctl daemon-reloadsudo systemctl restart alloydbomni17
Check the status of AlloyDB Omni
sudo
systemctl
status
alloydbomni17
Stop AlloyDB Omni
sudo
systemctl
stop
alloydbomni17
Connect to AlloyDB Omni
The AlloyDB Omni RPM package also includes the psql client that lets you open an interactive SQL shell session with the database server.
You can also connect to AlloyDB Omni using the PostgreSQL-compatible software of your choice.
Connect using bundled psql
/usr/lib/postgresql/17/bin/psql
-h
localhost
-U
postgres
This command connects you to the server as the postgres
user role, and displays a postgres=#
command prompt. You can now run psql commands
and SQL queries.
To exit psql
, run the \q
command.
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 within 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.

