Software⏱️ 1 min read📅 2026-05-31

How to Fix: psql: FATAL: database "<user>" does not exist

Postgres.app database not existing issue.

Quick Answer: Try running the command with the correct username, e.g. psql -h localhost -U , or check if the Postgres.app configuration is set up correctly.

To resolve the issue of 'psql: FATAL: database "<user>" does not exist' when using Postgres.app on Mac, you need to create the database manually.

✅ Best Solutions to Fix It

Method 1: Create Database Manually

  1. Step 1: Open Postgres.app and navigate to the 'Data' directory.
  2. Step 2: Create a new database using the command `psql -c "CREATE DATABASE ;"`

🎯 Final Words

[Wrap-up]

Alternatively, you can also use the Postgres.app GUI to create a new database. To do this, open Postgres.app, click on 'New Database', select the desired database name and owner, and then click 'Create'.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions