Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I forgot to configure login Email id and password while install pg admin 4. how i can change after installation

I am new to pgAdmin 4. I have forgot to setup of login Email id and password while install pgAdmin 4. How can I change after installation? Any one can help me?

like image 751
chandrasekar Avatar asked Oct 22 '19 04:10

chandrasekar


4 Answers

I'm assuming that since you don't remember your admin/password, you didn't do much with pgAdmin yet. If that's the case, you can move/remove the SQLite database out of the way and restart pgAdmin:

rm /var/lib/pgadmin/pgadmin4-server.db

or

mv /var/lib/pgadmin/pgadmin4-server.db /tmp

When you do this, you'll be prompted for a password the next time you start up the app.

You can also dump the contents of the SQLite database before moving/removing:

sqlite3 /var/lib/pgadmin/pgadmin4-server.db .dump
like image 188
richyen Avatar answered Nov 14 '22 15:11

richyen


As my friend @Almadani and @richyen post are completely right.

But If you are working on remote host databases its best to delete that folder.Such as it may on some instance[ssh]

sudo rm -rf /var/lib/pgadmin

After deletion of folder. you can simply create new credentials

sudo /usr/pgadmin4/bin/setup-web.sh

You can also check it out from the blog. By the way the blog is from here.

like image 44
000723-weict Avatar answered Nov 14 '22 13:11

000723-weict


I solved this issue on Linux Fedora 32, and it's working. I hope you find it useful for you.

cd /var/lib/pgadmin4/ 

[root@localhost pgadmin4]# ls

pgadmin4.db  sessions  storage

[root@localhost pgadmin4]# rm pgadmin4.db

rm: remove regular file 'pgadmin4.db'? y

[root@localhost pgadmin4]# ls

sessions  storage
like image 2
Almadani Avatar answered Nov 14 '22 13:11

Almadani


there is still a way to find the database pgadmin4.db download and open this file via HeidiSQL as SQLite, directly viewing the table is not available - you can run the query SELECT * from user you will see your username, and if you do not remember the password can be changed to any known (encoded) - this method helped me

like image 1
bobanobi4 Avatar answered Nov 14 '22 13:11

bobanobi4