Forgot Postgres Password | Reset Postgres Password in PgAdmin4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I seem to have forgotten my password and whenever I try to connect I'm getting the error password authentic should failed so let's see how we can fix this first go to your post qsql installation directory by default it is inside program files postgres SQL and the postgrad version if you have 13 12 14 10 it will work for everything click on it now go inside the data folder and here if you scroll down you will see this PG underscore hba.com now first make a copy of this Ctrl C Ctrl V and copy is created this is just for the backup purposes and now open this right click on this and open with notepad or you can open it with any editor that you want now scroll all the way down and here as you can see scram sat 256. so this is the authentication method that is being used right now instead of this I'll just change it to trust so change it to trust for everything save this file press Ctrl s and close it now what you need to do is you need to restart the post way server so type services and go down to postgres and once you found this post way SQL service click on restart the service now you will be able to log in without Authentication so once this has been restarted go to your PC admin again and cancel it and close it and open PC admin again and now you'll be able to log in without the password now what we will do is we will change the password to whatever we want so effect click on servers now as you can see I'm connected to postgres 15 server so what you need to do is click on this postgres here and click on this psql tool now you need to write the command that is Alter user postgres with password and here you need to set the password so I'll type admin123 and hit enter so as you can see you'll see this message alert roll and now you can close it and we will change this again we will delete this the Old Dot conf file and we will rename this so that it asks for password again right so now after we have reverted back to the old configuration file we can check it it will still be using the scram sha authentication now restart the postcode service again and let's open PG admin now and try with our new password that is and we want to three let's see if it works now as you can see it is not working again so let's type the new password now admin123 save the password click ok and we are back into our postpaid server if you have any questions let me know in the comments below
Info
Channel: The Code City
Views: 29,465
Rating: undefined out of 5
Keywords: reset postgres password, forgot password postgres, reset password pgadmin
Id: wfxrRxzm8jY
Channel Id: undefined
Length: 3min 24sec (204 seconds)
Published: Thu Jul 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.