• Support
  • PostgreSQL permission denied for schema public

I installed aapanel on Amazon's EC2, when I created a database on PostgreSQL Manager and connected to it from an ExpressJS application using ORM Sequelize, I got the message:

  • original: error: permission denied for schema public.
    It only happens with EC2 because I tried with some other VPS and it still connected normally.
    Please help me if you have encountered such a case

    Hello, please check if the relevant user exists? Check whether the user's permissions are accessible to everyone? After modifying permissions, you need to restart the service

    Log in:
    su - postgres

    enter the database
    psql

    Check out the database:
    \l

    View all database information
    SELECT * FROM pg_database ORDER BY datname;

    quit
    \q

    aaP_nampv.itomo

    Thank you, I tried it your way and did some more steps and it connected successfully.