I am about to deploy my app to a vps for the first time, and running into some issues while configuring my DB.
After running the following commands...
# PostgreSQL add-apt-repository ppa:pitti/postgresql apt-get -y update apt-get -y install postgresql libpq-dev
everything seemed to work fine until
sudo -u postgres psql
I was supposed to login to psql, but the command did not do anything (didn't return anything). I tried
instead, and it got me to postgres@myaccount:/root$
and then I tried
sudo postgres psql
and it asked me for the password, but the root password did not work for this.
What's the right way of logging into postgres in this case, and how do I set up my database?
UPDATE: I tried the following,
root@max:~# su postgres postgres@max:/root$ psql bash: /usr/bin/psql: /usr/bin/perl: bad interpreter: permission denied