postgres installation on server with Movable Type

147 Views Asked by At

I have just started a LAPP machine from Amazon ec2. I have updated it to be Movable Type ready. I am using the postgresql database. I stopped at the database installation section because I was getting a postgresql error. I thought the only user by default is 'postgre' and has no password. I put that in MT and it complains that I don't have a password. So I thought I need to make a new user. So I tried createuser and it is asking for a Password. I then did sudo and was now root. It still wants a Password. I do not know what it is.

Looking at the log it appears postgresql is shutdown. When I try to restart it by using pg_ctl it says I cannot be root to restart it. So I exit and run it again as the default user name it gives me and I get a permission error.

When I try to be root and createuser or do psql it says I need to give a password. I have tried to just hit return, and a bunch of other passwords that it may be. No luck. I thought since I was root I should be good.

I know postgresql is there because MT says it is.

So I need to either come up with a psql Password or be able to login as a different user with the ability to restart postgresql.

1

There are 1 best solutions below

5
On

When you are 'root', you could su to the postgres user. Then you should be able to create a new user. Remember to add the connection rights to the user in the /etc/postgresql//main/pg_hba.conf.