Search Postgresql Archives

Re: running postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles <post@xxxxxxxxxx> writes:
> I am running Gutsy (Ubuntu 7.10) and new to Postgresql. I followed the
> direction at https://help.ubuntu.com/community/PostgreSQL. I executed
> the following commands:
> 	sudo -u postgres createuser -D -A -P myuser
> 	sudo -u postgres createdb -O myuser mydb
> 	dagon@DagonUX32:~$ psql mydb

> and received the following error message:
> 	psql: FATAL:  role "dagon" does not exist.

> Apparently Postgresql gets confused with my login name.

There's no "confusion" about it: the default assumption for psql is that
your Postgres username is the same as your login name.  What else would
you have expected it to use?  If you want to use a different Postgres
username, you need to say so, eg

	psql -U myuser mydb

You might still have problems with that, because on many systems the
default user authentication method disallows logging in under a username
different from your login name.  I'm not sure if Ubuntu sets it up that
way, but if it does, you'd get something like "ident authorization
failed".  You'll need to read the manual chapter about client
authentication if you want to choose a different behavior, such as
password-based authentication.

In any case, using Postgres username equal to your login name is going
to save you lots of typing, so I'd suggest doing it that way unless you
have a really good reason not to...

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux