Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98409
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.python |
| Subject | Problems connecting to PostgreSQL |
| Date | Sun, 08 Nov 2015 00:40:11 +0100 |
| Organization | Decebal Computing |
| Lines | 24 |
| Message-ID | <87wptt5qg4.fsf@Equus.decebal.nl> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="31225"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uozJWoyto/AHxZNgG2mTlPfPatfm3vKM=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| X-Homepage | http://www.decebal.nl/ |
| Cancel-Lock | sha1:8K1uzyxpaUVQe4RiFufscrZ/a2M= sha1:QZqPbDmAmCLCkH39av0E9S981wg= |
| Xref | csiph.com comp.lang.python:98409 |
Show key headers only | View raw
I followed http://zetcode.com/db/postgresqlpythontutorial/.
I used:
sudo -u postgres createuser stressTest
this create the role, but also gave:
could not change directory to "/root": Permission denied
and I did not get the questions.
Then I used:
sudo -u postgres createdb stressTest -O stressTest
This gave also:
could not change directory to "/root": Permission denied
The database is created, but when I execute:
conn = psycopg2.connect(database = postgres_database, user = 'stressTest')
I get:
psycopg2.OperationalError: FATAL: Peer authentication failed for user "stressTest"
What do I need to do to get things working?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Problems connecting to PostgreSQL Cecil Westerhof <Cecil@decebal.nl> - 2015-11-08 00:40 +0100
Re: Problems connecting to PostgreSQL Chris Angelico <rosuav@gmail.com> - 2015-11-08 10:54 +1100
Re: Problems connecting to PostgreSQL Chris Warrick <kwpolska@gmail.com> - 2015-11-08 09:36 +0100
Re: Problems connecting to PostgreSQL Cecil Westerhof <Cecil@decebal.nl> - 2015-11-09 13:59 +0100
csiph-web