Software⏱️ 2 min read📅 2026-06-04

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

Fix psql: FATAL: database "<user>" doe. Try running the command with the correct. Step-by-step guide included.

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

Following these step-by-step methods should resolve the error efficiently on your system.

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