Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
I have a problem using Postgresql. I am working on linux OS and I create a new user. I have a database in PSQL username and password. I need to access this database from the user that I was created.

What I have tried:

add a .pgpass then add the username pass user... and chmod 600 .pgpass
The error: psql: FATAL: role "user1" does not exist.
Any help? Thanks in advance
Posted
Updated 14-Jul-17 6:41am
v2

1 solution

You'll need to
createuser user1
as the database manager, probably user postgres. You may need to su root, then su postgres to get database manger permissions. You'll probably also want to look into postgresql ROLES if the user needs to create or delete database objects.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900