Renu Fulmali
09/30/2025, 4:18 PMkapa.ai
09/30/2025, 4:19 PMERROR: permission denied for schema public indicates that the Airbyte user configured for your external database does not have sufficient privileges on the public schema. This is a common issue when setting up Airbyte with an external Postgres-compatible database. From the knowledge sources, the required solution is to ensure that the Airbyte user has all necessary privileges on both the database and the public schema. Even if you have already granted privileges, sometimes the schema ownership or specific grants may be missing or not applied correctly. Here’s what you should do: 1. Grant All Privileges on the Database and Schema: Make sure the Airbyte user has all privileges on the database and the public schema. You can do this by running the following SQL commands as a superuser or a user with sufficient privileges: sql -- Replace airbyte_user and your_database with your actual user and database names GRANT ALL PRIVILEGES ON DATABASE your_database TO airbyte_user; GRANT ALL PRIVILEGES ON SCHEMA public TO airbyte_user; ALTER SCHEMA public OWNER TO airbyte_user; 2. Check for Ownership: Sometimes, even after granting privileges, the schema owner is not set to the Airbyte user, which can cause permission issues. The ALTER SCHEMA public OWNER TO airbyte_user; command above ensures the Airbyte user owns the schema. 3. Apply to All Databases Used by Airbyte: If you are using additional databases for Temporal (such as temporal and temporal_visibility), repeat the above steps for each database and schema involved in your Airbyte deployment. This approach is confirmed by both user reports and official responses in the knowledge sources, where missing or insufficient privileges on the public schema led to similar errors, and the issue was resolved by explicitly granting the necessary permissions and ownership to the Airbyte user [see example](https://github.com/airbytehq/airbyte/issues/60244). If you have already run similar commands, double-check that you are connected to the correct database and that the grants have been applied to the right user and schema. If you are using managed databases (like Azure or AWS RDS), ensure that your user has the ability to modify schema ownership and privileges, as some managed services restrict these operations. If you continue to see the error after applying these changes, please provide the exact SQL commands you used and confirm the user and schema names, so further troubleshooting can be more targeted.Renu Fulmali
09/30/2025, 4:38 PMkapa.ai
09/30/2025, 4:38 PMkapa.ai
09/30/2025, 4:38 PMERROR Unable to create SQL database. {"error": "pq: permission denied to create database", ...} means that the database user configured for Airbyte does not have permission to create new databases in your Postgres instance. This is a common issue when deploying Airbyte with an external Postgres database, especially for the Temporal component, which tries to create the temporal and temporal_visibility databases if they do not already exist. How to resolve: - Option 1: Grant CREATE DATABASE permission If possible, grant your Airbyte user the CREATEDB privilege so it can create the required databases automatically. - Option 2: Manually create the databases If you cannot grant CREATEDB (common in production or managed environments), you must manually create the temporal and temporal_visibility databases, and then grant all privileges on these databases to the Airbyte user. For example: sql CREATE DATABASE temporal; GRANT ALL PRIVILEGES ON DATABASE temporal TO airbyte_user; CREATE DATABASE temporal_visibility; GRANT ALL PRIVILEGES ON DATABASE temporal_visibility TO airbyte_user; This approach is confirmed as the solution in multiple user reports and official answers [see here](https://discuss.airbyte.io/t/1544) and [here](https://github.com/airbytehq/airbyte/issues/49304). Summary: You are seeing this error because the Airbyte user does not have permission to create databases. Either grant the necessary permission or manually create the required databases and assign privileges to the Airbyte user.