V
V
Vitaly2016-07-19 14:37:02
PostgreSQL
Vitaly, 2016-07-19 14:37:02

How to get into postgress environment on debian?

All the best.
I installed via aptitude the postgres database during the installation process, I was not asked about creating a password or user.
Now I can’t log into psql :(
I drive psql -h localhost -U postgres and in response I want a password, but I don’t know it :(
And I can’t create a new user either :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2016-07-19
@rostel

su - postgres
psql

you can set a password for postgres in the postgres console,
then you can log in without switching to a user

M
Melkij, 2016-07-19
@melkij

Root access to the database is provided for the postgres user (system, without a password, you can log in via sudo):
sudo -u postgres psql

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question