Open Connection Dialog
Click the green + icon in the Connections panel on the left side of SQL Developer. This opens the New Database Connection dialog.
Set up a PostgreSQL connection in SQL Developer in just a few clicks. No complex configuration required — the PostgreSQL driver is built-in.
# Connection target
database = PostgreSQL 9.6+ / 12.x / 14.x / 16.x
driver = PostgreSQL JDBC (bundled)
port = 5432 # default; configurable
protocol = TCP # SSL recommended for remote
auth = username/password
# Setup info
time = 5 minutes
difficulty = Beginner
steps = 4
prereq = SQL Developer installed (driver included)
// 4 setup steps + 4 connection examples + troubleshooting below
What you'll need before opening the New Connection dialog.
Good news: Unlike MySQL, you don't need to download a separate JDBC driver. SQL Developer includes PostgreSQL support out of the box.
Four steps to a working connection. Total time: about 5 minutes.
Click the green + icon in the Connections panel on the left side of SQL Developer. This opens the New Database Connection dialog.
In the connection dialog, click the PostgreSQL tab on the left side. The form will update to show PostgreSQL-specific fields.
Connection Name: any name (e.g., "My Postgres DB")
Username: postgres (or your user)
Password: your password
Hostname: localhost or server IP
Port: 5432 (default)
Database: postgres (or your DB name)
Click Test to verify the connection works. If successful, click Save then Connect.
Four common configurations — local, Heroku, Amazon RDS, and DigitalOcean managed databases.
# Local PostgreSQL Server
hostname = localhost
port = 5432
database = postgres
username = postgres
# Heroku Postgres add-on
hostname = ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
port = 5432
database = (from Heroku dashboard)
ssl = required
# Amazon RDS PostgreSQL endpoint
hostname = your-instance.xxxx.region.rds.amazonaws.com
port = 5432
database = postgres
username = your_master_user
# DigitalOcean Managed Database
hostname = your-db-do-user-xxxxx-0.db.ondigitalocean.com
port = 25060
database = defaultdb
ssl = required
Fixes for the three errors most often hit during PostgreSQL setup.
sudo systemctl status postgresql) and verify pg_hba.conf allows your connection. Full fix in the connection-refused guide.ALTER USER postgres PASSWORD 'newpass';pg_hba.conf and add: host all all 0.0.0.0/0 md5, then restart PostgreSQL.If you also need MySQL, the setup is nearly identical to PostgreSQL — same New Connection dialog, port changes to 3306, and you need to add the MySQL JDBC .jar once (PostgreSQL ships with its driver built in).
See also: First Query Tutorial · Schema Explorer · Don't have it yet? Download SQL Developer