How to set mail and password in pgadmin 4 in Ubuntu 20.04 - postgresql

I already had pgadmin installed before ubuntu was updated to 20.04. Once it was updated, I realized that pgadmin had disappeared (my databases in postgresql are still there intact) and I followed the instructions below to install pgadmin4:
How to Install PostgreSQL and pgAdmin4 in Ubuntu 20.04
At some point it was supposed to ask me to configure an account with my email and password, but it never did, now I am able to get to the home screen but I cannot login because I did not configure an email and password.
Any help is welcome, thank you!

I removed
/var/lib/pgadmin/pgadmin4.db
file. It was first start pgadmin4 for me so there were nothing important
And then I run
sudo /usr/pgadmin4/bin/setup-web.sh
again and it ask for email\password

Related

Installing postgres on Ubuntu 18.04 prompts for "Password:". Which Password should be supplied?

I am trying to create a scripted installation of Postgres on Ubuntu 18.04.06, using bash. In order to do this, I am using the following post from Digital Ocean as a starting point, and adapting it to my needs:
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
The account that I am using is a sudoer on the machine. I am running the following two lines - the problem occurs on the second line:
sudo apt-get -y update
sudo apt-get -y install postgresql
The apt update completes successfully, then the postgresql install chugs along until it reaches this point:
Selecting previously unselected package postgresql.
Preparing to unpack .../postgresql_14+238.pgdg18.04+1_all.deb ...
Unpacking postgresql (14+238.pgdg18.04+1) ...
Setting up postgresql-client-common (238.pgdg18.04+1) ...
Setting up postgresql-common (238.pgdg18.04+1) ...
Password:
I have tried entering the password to my sudoer account - all it does is hang. I have also tried just hitting ENTER - no dice.
I can see from the docs and the /etc/passwd file that the Postgres install process creates a postgres unix account automatically. If the Password: prompt is asking for the password to this postgres account, I don't know where to find this password either.
To summarize:
Can this Password: prompt be avoided entirely?
If the prompt can't be avoided, where do I find the correct password?
Thanks !

How to access Odoo 14 using WSL

I have installed Odoo 14 in Ubuntu 20LTS as WSL, everything seems fine and the service is running. However, I am lost on how to access Odoo page. I have tried 0.0.0.0:8069 in Windows (Chrome) but it says that:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Any help on that?
Also, please let me know how I can change the Port for Odoo in Ubuntu in WSL.
Many Thanks.
Here is the solution to my problem :
PostgreSQL: Why psql can't connect to server?
Step 5: Check postgres user belongs to ssl-cert user group
It happened to me and it turned out that I removed erroneously the Postgres user from "ssl-cert" group. Run the below code to fix the user group issue and for fixing the permissions
sudo gpasswd -a postgres ssl-cert
# Fixed ownership and mode
sudo chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
# now postgresql starts! (and install command doesn't fail anymore)
sudo service postgresql restart````

pgadmin can't log in after update

Just updated pgadmin4 to version 4.8 and now it won't accept ssh tunnel password into server, I get the following error message:
Failed to decrypt the SSH tunnel password. Error: 'utf-8' codec can't decode byte 0x8c in position 0: invalid start byte
Is there a way around this, I can't restart the database server at this time.
In latest pgAdmin4 version they have increased the security of saved password by implementing master password feature, I think that is causing this issue, meantime you can rename pgadmin4.db to pgadmin4.db_OLD and restart pgAdmin4.
Note: You have to add the all the servers again.
---------- UPDATE ----------
It has been fixed now https://redmine.postgresql.org/issues/4320 and will be in 4.9.
You can try nightly builds though https://postgresql.org/ftp/pgadmin/pgadmin4/snapshots
This also happened for me moving from 4.8.2 for Ubuntu 18.10 to 4.8.2 for Ubuntu 19.04 (different installs). I was able to resolve this by restarting the postgres server with sudo systemctl restart postgresql
As said Murtuza Z, in https://redmine.postgresql.org/issues/4320, you can get fixed server_manager.py and replace it at (pgAdmin install dir)/web/pgadmin/utils/driver/psycopg2/server_manager.py, then restart the pgadmin server.
You can get server_manager.py:
It is attached in an issue info. < this worked for me.
Get from snapshots provided by Murtuza Z in same directory.

MAMP fresh install cannot access phpmyadmin

I'm using MAMP to set up a magenta installation. But after a fresh install of MAMP, I wanted to set up the db and it's giving me this error:
MySQL said: Documentation
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
I've been researching for over an hour and everything I find doesn't help. I never changed the default password for mysql and I'm able to log in using the command line and -uroot -proot. I also tried changing the password and it didn't make any difference.
OSX 10.11.0
MAMP 3.5.1
PHP 7.0.8
Make sure your PHP version in MAMP is 5.6.10.
I've been having the exact same problem and just switched the PHP prefs from 7.0.8 to 5.6.10, restarted the servers and I can get into phpMyAdmin now.
It was driving my bonkers as well.

Unable to connect to PostgreSQL 9.3

Recently, I have installed PostgreSQL 9.3 on my windows 7 64 bit PC but today I have formatted my PC. Now again I tried to install PostgreSQL 9.3 but after installation when I tried to connect it throws error See below screenshot :-
My pg_hba.conf is shown below :
I have also saw Postgres password authentication fails but nothing helps.
I am new to PostgreSQL,please help me on this.
Finally I found the solution hope this will help to other users if they are facing the same problem :-
I have to edit pg_hba.conf file which is located in "C:\Program Files\PostgreSQL\9.3\data". In that file I have to make method md5 to trust as #Craig Ringer said. So the line will look like host all postgres 127.0.0.1/32 trust.
Then to restart the PostgreSQL on windows - Go to start > run > services.msc then restart the service.
Then open pg Admin create new server enter all the required details and save it. That's it !!