db = PostgresqlDatabase('my_database', host='localhost', port=5432, user='postgres', password='postgres') db.connect()
Буду благодарен за помощь.
db = PostgresqlDatabase('my_database', host='localhost', port=5432, user='postgres', password='postgres') db.connect()
# allow postgres user to use “ident” authentication on Unix sockets
# (as per recent comments, omit “sameuser” if on postgres 8.4 or later)
local all postgres ident sameuser
# allow all other users to use “md5” authentication on Unix sockets
local all all md5
# for users connected via local IPv4 or IPv6 connections, always require md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
CREATE ROLE myuser LOGIN PASSWORD ‘mypass’;
CREATE DATABASE mydatabase WITH OWNER = myuser;