Showing posts with label psql login error. Show all posts
Showing posts with label psql login error. Show all posts

Friday, January 2, 2015

postgres: Postgres-XC: must start as either a Coordinator (--coordinator) or Datanode (--datanode)

Postgresql Server Error in Ubuntu :
postgres: Postgres-XC: must start as either a Coordinator (--coordinator) or Datanode (--datanode)

To remove this error, remove the package
apt-get --purge remove postgres-xc
But if you are not able to remove it because of an error, Find all processes of postgres using
ps aux | grep postgres
or
ps aux | grep psql

and kill all one by one. Now try to remove again.

Now install these packages:
apt-get install postgresql-client-common
apt-get install postgresql-common
apt-get install postgresql-9.3
apt-get install postgresql-client-9.3
apt-get install postgresql-contrib-9.3

psql: FATAL: Ident authentication failed for user "root"

Postgresql error
psql: FATAL:  Ident authentication failed for user "root"

If you run command psql on terminal as root user and you get the error
psql: FATAL:  Ident authentication failed for user "root"
Here is solution for you. 

To resolve this error, Run these two commands on your terminal.
sudo -u postgres createuser root
It might give you this message
could not change directory to "/root"
Do not worry about it, when it asks
Shall the new role be a superuser? (y/n)

Enter y and press return key.

and the other command is
sudo -u postgres createdb root -O root
Now run command psql on terminal and you will log into postgresql command prompt as user root.

To check the list of postgresql databases, run command
\list

to quit the psql command prompt, run command
\q