i simply cannot connect pgadmin to the postgresql running on local host!
i followed the official Ubuntu document for setting postgres up. i can also access the db through terminal easily by using:
psql --host localhost --username <user_name> --password -p 5433 --dbname <db_name>
the error generated by the pgadmin interface is this:
(https://i.stack.imgur.com/dQBxz.png)
while the above mentioned command in terminal executes successfully and outputs:
psql (14.9 (Ubuntu 14.9-0ubuntu0.22.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
iam using ubuntu :
Linux d 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
and psql --version is :
psql (PostgreSQL) 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)
content of postgresql.conf is as follows:
data_directory = '/var/lib/postgresql/14/main'
hba_file = '/etc/postgresql/14/main/pg_hba.conf'
ident_file = '/etc/postgresql/14/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/14-main.pid'
listen_addresses = '*'
port = 5433
max_connections = 100
unix_socket_directories = '/var/run/postgresql'
ssl = on
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
shared_buffers = 128MB
dynamic_shared_memory_type = posix
max_wal_size = 1GB
min_wal_size = 80MB
log_line_prefix = '%m [%p] %q%u@%d '
cluster_name = '14/main'
stats_temp_directory = '/var/run/postgresql/14-main.pg_stat_tmp'
datestyle = 'iso, mdy'
lc_messages = 'en_US.UTF-8'
default_text_search_config = 'pg_catalog.english'
include_dir = 'conf.d'
i also tried this solution but it didn't work, beside,this is not really a safe way to achieve it!