Postgres and creating users/ connecting to databases ?
Hello,
When i go and want to create a root user in Postgres i get this.. sudo createuser -U postgres -P createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? And when i try to create a database it says db_create tester createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" psql: FATAL: Ident authentication failed for user "root" |
What user are you trying to do that with? If not already, su to postgres:
su - postgres From here run your commands. |
When i switch to user postgres and run the command db_create tester
I get createdb: could not connect to database postgres: FATAL: role "postgres" does not exist psql: FATAL: database "tester" does not exist[*] Database creation complete (check for errors) |
What do you get when you run a plain
psql Is postgres (which version, btw, on which of your listed distros?) actually running on that machine? Quote:
|
All times are GMT -5. The time now is 03:03 AM. |