E
E
Enter_a_nickname2022-03-22 11:46:42
PostgreSQL
Enter_a_nickname, 2022-03-22 11:46:42

Why are databases and users not created in postgreslq?

I'm using ubuntu 20.04.3
Installed the postgresql-12 version via the sudo apt-get install postgresql-12 command
When installing, I catch this line:

success. You can now start the database server using:

pg_ctlcluster 12 main start

Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main. log
update-alternatives: using /usr/share/postgresql/12/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode


I go into the settings: sudo -u postgres psql
and execute commands to create users and databases, the commands do not give errors, but nothing is added.

I tried to run the command: sudo pg_ctlcluster 12 main start, but it didn't change anything either.
What needs to be done to create users and databases to work correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Trafalgar, 2022-03-25
@manjarosan

Try installing postgresql-contrib and start the service with the command
sudo apt-get install postgresql-contrib
sudo service postgresql start

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question