V
V
Vetal Matitskiy2015-05-05 23:42:37
linux
Vetal Matitskiy, 2015-05-05 23:42:37

How to make a user the owner of a database in postgresql?

good afternoon, dear linux gurus. Can you please tell me how in Linux through the console it is possible to assign a user to the owner of this database for an existing database?
for study, you need to create a base. tried to configure pgadmin, but when creating a connection, it displays "Error connecting to the server: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres""

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Swartalf, 2015-05-06
@vetalmatitskiy

But judging by the error FATAL: password authentication failed for user "postgres""
I would also set the password again for the user
# su - postgres
$ psql
..=# ALTER USER postgres with password 'secure_password';

S
Shurik, 2015-05-06
@aioon

# su - postgres
$ psql
..=# GRANT ALL PRIVILEGES ON DATABASE "database" to user;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question