Connect to local PostgreSQL from Mac
Use 127.0.0.1 as the host when PostgreSQL runs on the same Mac as TableAI.
For a container, use the Docker guide instead.
Before you start
Section titled “Before you start”You need a running PostgreSQL server, its TCP port, and a database account. TableAI connects through a host and port, so the server must accept TCP connections.
Find your connection details
Section titled “Find your connection details”Check your PostgreSQL installation for the database name, user, and configured port.
The usual PostgreSQL port is 5432; use the configured value if it differs.
If PostgreSQL client tools are installed, check readiness in Terminal:
pg_isready -h 127.0.0.1 -p 5432This checks whether the server accepts connections, not whether your password is correct. See the PostgreSQL readiness reference.
Connect to local PostgreSQL from Mac
Section titled “Connect to local PostgreSQL from Mac”- Choose File › New Connection….
- Select PostgreSQL in Driver.
- Give the connection a Name.
- Enter
127.0.0.1in Host and the server’s TCP port in Port. - Enter Database, User, and Password for your local server.
- Configure SSL Mode for your server.
- Click Test.
- Click Save & Connect after a successful test.
See connection basics for password storage and URL import.

SSL and network access
Section titled “SSL and network access”Use the SSL/TLS guide if your local server uses certificates. A server on this Mac does not need an SSH tunnel. For a server on another computer, enter that computer’s address and check Local Network permission.
If it does not connect
Section titled “If it does not connect”connection refusedno pg_hba.conf entry for hostFor a refusal, check the running server, TCP port, and listen_addresses setting.
For a pg_hba.conf error, check the server’s rules for the client address, database, user, and encryption.
A successful Unix socket login in Terminal can use different authentication rules from TableAI’s TCP connection.
Use password authentication failed for rejected credentials, or connection failed for network errors.
Related
Section titled “Related”Continue with write and run SQL, or return to the PostgreSQL overview.