0

I am new to the PostgreSQL environment. I'm currently working on a Spring Boot application that utilize PostgreSQL as the database. However, when I attempt to run the application, I encounter an error in the console with the following message:

[ERROR: permission denied for schema public Position: 14]

I have tried various approaches and granted essential privileges, but I find myself consistently facing the same issue.

For your reference, here is the content of my application.properties file:

server.port=8000

spring.datasource.url=jdbc:postgresql://localhost:5432/fwitterdb

spring.datasource.username=fuser
spring.datasource.password=password

spring.datasource.driver-class-name=org.postgresql.Driver

#Allows us to convert the Jpa to postgres language
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

spring.jpa.show-sql=true

spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.default_schema=public
`

Furthermore, I executed the following SQL commands:
`create user fuser with password 'password';

create database fwitterdb;

grant all privileges on database fwitterdb to fuser;

SELECT grantee, privilege_type
FROM information_schema.role_table_grants
WHERE table_schema = 'public';

GRANT ALL PRIVILEGES ON SCHEMA public TO fuser;

GRANT ALL ON SCHEMA public TO fuser;

GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO fuser;

I would greatly appreciate it if someone could provide assistance with this issue. Thank you.

A solution to the problem:)

toyota Supra
  • 3,181
  • 4
  • 15
  • 19

0 Answers0