# How do I fix the "Database Does Not Exist" error when connecting to PostgreSQL? A `Database Does Not Exist` error like the following occurs when you try to connect to a database doesn’t exist in your specified cluster or to the wrong cluster: ``` psql: FATAL: database "defaultdb" does not exist ``` If you are getting this error, first verify that you are using the correct hostname to connect by following [How to Connect to PostgreSQL Database Clusters](https://docs.digitalocean.com/products/databases/postgresql/how-to/connect/index.html.md). Then, verify that you’ve created the database in your cluster of choice by following [How to Manage PostgreSQL Users and Databases in a Database Cluster](https://docs.digitalocean.com/products/databases/postgresql/how-to/manage-users-and-databases/index.html.md). ## Related Topics [How do I fix a "permission denied for schema public" error in PostgreSQL?](https://docs.digitalocean.com/support/how-do-i-fix-a-permission-denied-for-schema-public-error-in-postgresql/index.html.md): Update the user’s privileges to `CREATE`, `USAGE`, or `ALL` on the public schema. [How do I fix the pgvector "could not open extension control file" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-pgvector-could-not-open-extension-control-file-error/index.html.md): Use the command CREATE EXTENSION vector; instead of pgvector. [How do I fix the pg_dumpall "permission denied for table pg_authid" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-pg_dumpall-permission-denied-for-table-pg_authid-error/index.html.md): Add the –no-role-passwords flag to the pg\_dumpall command.