psql command

Q. I’ve installed Postgresql under Red Hat Enterprise Linux 5.x server. I’ve created username / password and database. But when I try to connect it via PHP or psql using following syntax:

psql -d myDb -U username -W

It gives me an error that read as follows:

psql: FATAL: Ident authentication failed for user “username”

How do I fix this error?


Q. How do I create a user account called tom and grant permission for database called jerry? A. You need to use following commands. => adduser – UNIX/Linux adduser command to add a user to /etc/passwd file => psql => It is a terminal-based front-end to PostgreSQL. => CREATE USER – Adds a new user […]