I have did all the things required and i am able to login to postgresql datadbase and i provided the all the permissions to the data base and made changes in pg_hbf.file but it is marked as failed.
FYI>>
Error : - ‘PostgreSQL’ is not configured correctly, either user ‘kodekloud_roy’ and database ‘kodekloud_db1’ does not exist or user ‘kodekloud_roy’ does not has appropriate permissions on database ‘kodekloud_db1’ on DB Server
hi @vishnu123sai, my task also failed for the second time.I believe, i have done it right. @Inderpreet or anyone else, Please take a look at the attached screenshot.Any help is much appreciated.Thanks.
The steps i have followed is as follows,
echo -n ‘provided password’ | md5sum
sudo -u postgres psql
CREATE USER kodekloud_pop WITH ENCRYPTED PASSWORD ‘d519eb4c9de1b2b69b2192a50a9fc408’;
CREATE DATABASE kodekloud_db6 OWNER kodekloud_pop;
GRANT ALL PRIVILEGES ON DATABASE kodekloud_db6 TO kodekloud_pop;
I have altered the user with SUPERUSER, CREATEDB, CREATEROLE
As per the screenshot, the user has all the necessary permissions as well as able to connect to database.
You don’t need to encrypt password into the md5. You have to use at it is from the question and you just need to configure method to accept md5 as you did. I haven’t seen in the question to convert into md5.
Hi Selvage, thanks for posting the solution.I have tried your steps, but I don’t see any roles attached to the user.Do I need to alter the user with SUPERUSER, CREATEDB, CREATEROLE command to see the permission?Also, when I try to login from postgres# using psql -U -d -h -W, nothing happens.Could you please guide me, what needs to be done to get it right.I am going to attempt this task third time.Thanks.
Regards
Nidhin
@nidhincn
below steps will give all permissions to user.
CREATE USER kodekloud_joy WITH ENCRYPTED PASSWORD 'B4zNgHA7Ya'; CREATE DATABASE kodekloud_db10 OWNER kodekloud_joy; GRANT ALL PRIVILEGES ON DATABASE kodekloud_db10 TO kodekloud_joy;