mardi 30 décembre 2014

Can not run PostgreSQL after drop table


I've deleted database from PostgreSQL and after this I can do nothing. Here what i receive with createuser



$ createuser -D new_user
createuser: could not connect to database postgres: FATAL: role "postgres" does not exist


And this when try to run psql



$ psql
psql: FATAL: role "postgres" does not exist


I've tried above with root, postgres, custom users. Still same output


Also I searched for pg_hba.conf like this find / -name 'pg_hba.conf' and got this



/var/lib/postgres-xc/DN2/pg_hba.conf
/var/lib/postgres-xc/DN1/pg_hba.conf
/var/lib/postgres-xc/CN/pg_hba.conf
/etc/postgres-xc/coordinator/CN/pg_hba.conf
/etc/postgres-xc/datanode/DN2/pg_hba.conf
/etc/postgres-xc/datanode/DN1/pg_hba.conf
/etc/postgresql/9.3/main/pg_hba.conf


I've changed connection method to trustfor localhost and IPv4 in /etc/postgresql/9.3/main/pg_hba.conf.


What should I do get rid of this error?


Does connection method in other files above should be edited too?





Aucun commentaire:

Enregistrer un commentaire