I am new to this type of database and I try to connect to it through the command line specifying psql, and then entering the password as blank. I get the above error (in the title of this question).
I dont know what the default password.
pg_hba file:
IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
host replication DIMA 127.0.0.1/32 trust
host replication DIMA ::1/128 trust
postgresql.config
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
I restart the server this way:
C:\metasploit\postgresql\bin\pg_ctl -D "C:\metasploit\postgresql\myData" -l logfile start
All I want is to enter the database and change my password. And preferably to enter the PgAdmin-III (in GUI form)
Edit the pg_dba. conf file and change all local connections from md5 to trust. By doing this, you can log in to the PostgreSQL database server without using a password.
To answer what is the default password for the PostgreSQL user, there isn't one. When connecting to PostgreSQL on Linux for the first time, many admins have this question, especially if they are from the MySQL world.
PostgreSQL database passwords are separate from operating system user passwords. The password for each database user is stored in the pg_authid system catalog. Passwords can be managed with the SQL commands CREATE ROLE and ALTER ROLE, e.g., CREATE ROLE foo WITH LOGIN PASSWORD 'secret' , or the psql command \password .
If you were using trust
authentication (which you should only use for development, if then) you would not be prompted for a password by psql
.
I'd say you didn't properly restart the server. Maybe use restart
instead of start
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With