Обсуждение: server administration problem: Database startup and permissions
Hi,
I created a database cluster using the following commands as per what is given in the postgres server administration manual
root# mkdir /usr/local/pgsql/jas
root# chown jsbali /usr/local/pgsql/jas
root# su jsbali
jsbali# initdb -D /usr/local/pgsql/jas
After that i tried to start up the postmaster process using the follwing command
jsbali# pg_ctl start -D /usr/local/pgsql/jas
It does start the postmaster process.
Then i create a new database here using the following command
jsbali# createdb DBxyz
here in the same user account i try to open pgadmin3 and it doens't
I open pgadmin3 from the root account and try to connect to my local host and it says
An error has occured:
Error connecting to the server: FATAL: role "postgres" does not exist
I created a database cluster using the following commands as per what is given in the postgres server administration manual
root# mkdir /usr/local/pgsql/jas
root# chown jsbali /usr/local/pgsql/jas
root# su jsbali
jsbali# initdb -D /usr/local/pgsql/jas
After that i tried to start up the postmaster process using the follwing command
jsbali# pg_ctl start -D /usr/local/pgsql/jas
It does start the postmaster process.
Then i create a new database here using the following command
jsbali# createdb DBxyz
here in the same user account i try to open pgadmin3 and it doens't
I open pgadmin3 from the root account and try to connect to my local host and it says
An error has occured:
Error connecting to the server: FATAL: role "postgres" does not exist
Don't know whats going on wrong.
I'm totally confused.
~Jas
This is because in the pgadmin3 server settings for PostgreSQL database you did set the user as 'postgres' (default behavior) and never changed it. Now as you did run the 'initdb' process with user 'jsbali' so that is the user which exists in the database not the 'postgres' user. So the solution for that will add the user 'jsbal' in your pgadmin3 server settings instead of 'postgres' and then try connecting from pgadmin3.
Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 7/28/06, Jasbinder Bali < jsbali@gmail.com> wrote:
Hi,
I created a database cluster using the following commands as per what is given in the postgres server administration manual
root# mkdir /usr/local/pgsql/jas
root# chown jsbali /usr/local/pgsql/jas
root# su jsbali
jsbali# initdb -D /usr/local/pgsql/jas
After that i tried to start up the postmaster process using the follwing command
jsbali# pg_ctl start -D /usr/local/pgsql/jas
It does start the postmaster process.
Then i create a new database here using the following command
jsbali# createdb DBxyz
here in the same user account i try to open pgadmin3 and it doens't
I open pgadmin3 from the root account and try to connect to my local host and it says
An error has occured:
Error connecting to the server: FATAL: role "postgres" does not exist
Don't know whats going on wrong.
I'm totally confused.
~Jas