Help Center/ Relational Database Service_RDS for PostgreSQL/ Troubleshooting/ Error "permission denied for schema public" Was Reported When I Attempted to Create a Table Using a Common Account
Updated on 2026-07-06 GMT+08:00
Error "permission denied for schema public" Was Reported When I Attempted to Create a Table Using a Common Account
Scenarios
The error "permission denied for schema public" was reported during table creation in RDS for PostgreSQL.
The process was as follows:
- An RDS for PostgreSQL 17 instance was created.
- The database postgres was connected using the root account.
- After a successful connection, a new database test_001 and a new account test were created.
- The owner of database test_001 was changed to test.
- The error message "permission denied for schema public" was displayed when the test account was used to connect to the test_001 database and the following command was executed to create a table:
create table test001(id varchar(2));
Possible Causes
The common account lacks necessary permissions.
Solutions
- Connect to the test_001 database as the root user and run the following command to configure permissions for the test account:
grant create on schema public to test;
- Connect to the test_001 database as the test user and run the table creation command again. The command will be executed successfully.
create table test001(id varchar(2));
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot