Re: Best starter book
От | Tom Lane |
---|---|
Тема | Re: Best starter book |
Дата | |
Msg-id | 21640.1274464780@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Best starter book (Donn Washburn <n5xwb@comcast.net>) |
Список | pgsql-novice |
Donn Washburn <n5xwb@comcast.net> writes: > This is an example of the problem. > I went to http://www.postgresql.org/docs/current/static/ and started > looking at everything until /tutorial-createdb.html. Where it states > createdb. > I get as a (system user)donn@m1l-suse:~> createdb mydb > createdb: could not connect to database postgres: FATAL: Ident > authentication failed for user "donn" Well, the reason you're not likely to find this covered as the first item in any Postgres book is that it's specific to particular configurations. Evidently you have got an installation that sets up "ident" as the standard login authentication method, which is common in Linux packagings of PG but it's not the factory default. Anyway ident insists (by default, again) that your OS-level user name match the database user name you're trying to log in as. Now since you don't have a database user named "donn", that fails. The only database user you do have, most likely, is postgres. So the first thing you want to do is something like sudo su - postgres createuser donn ^D and now you'll be able to connect as user donn. NB: createuser will ask whether to make donn a superuser, which you probably want if you're just playing around. regards, tom lane
В списке pgsql-novice по дате отправления: