First time here? Check out the FAQ!

Revision history  [back]

In my pg_hba.conf I have, approximately

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   askbot      askbot                            md5
local   test_askbot askbot                            md5

These entries must be before "all" - there might be something like:

local   all         all                               ident

Put your lines above that one.

After the file is changed, restart the database daemon process. On my system I do

/etc/init.d/postgresql restart

But also you'll need to create a user, databases and assign owner to the databases.

To do that, you need to log in as user postgres - you could also su to that user through root and then open the database:

su #enter root password
su postgres
psql #user postgres can login without password

Then in the database run:

create role askbot with login encrypted password 'thepassword';
create database askbot with owner=askbot;

If you want to run tests as well, you will need to add privilege to create database, and create database for running the testcases:

alter role askbot with createdb;
create database test_askbot with owner=askbot;

or add the privilege in the first create role statement.

In my pg_hba.conf I have, approximately

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   askbot      askbot                            md5
local   test_askbot askbot                            md5

These entries must be before "all" - there might be something like:

local   all         all                               ident

Put your lines above that one.

After the file is changed, restart the database daemon process. On my system I do

/etc/init.d/postgresql restart

But also you'll need to create a user, databases and assign owner to the databases.

To do that, you need to log in as user postgres - you could also su to that user through root and then open the database:

su #enter root password
su postgres
psql #user postgres can login without password

Then in the database run:

create role askbot with login encrypted password 'thepassword';
create database askbot with owner=askbot;

If you want to run tests as well, you will need to add privilege to create database, and create database for running the testcases:database:

alter role askbot with createdb;
create database test_askbot with owner=askbot;

or add the privilege in the first create role statement.

In my pg_hba.conf I have, approximately

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   askbot      askbot                            md5
local   test_askbot askbot                            md5

These entries must be before "all" - there might be something like:

local   all         all                               ident

Put your lines above that one.

After the file is changed, restart the database daemon process. On my system I do

/etc/init.d/postgresql /etc/init.d postgresql restart

But also you'll need to create a user, databases and assign owner to the databases.

To do that, you need to log in as user postgres - you could also su to that user through root and then open the database:

su #enter root password
su postgres
psql #user postgres can login without password

Then in the database run:

create role askbot with login encrypted password 'thepassword';
create database askbot with owner=askbot;

If you want to run tests as well, you will need to add privilege to create database:

alter role askbot with createdb;

or add the privilege in the first create role statement.

In my pg_hba.conf I have, approximately

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   askbot      askbot                            md5
local   test_askbot askbot                            md5

These entries must be before "all" - there might be something like:like

local   all         all                               ident

Put your lines above that one.

After the file is changed, restart the database daemon process. On my system I do

/etc/init.d postgresql restart

But also you'll need to create a user, databases and assign owner to the databases.

To do that, you need to log in as user postgres - you could also su to that user through root and then open the database:

su #enter root password
su postgres
psql #user postgres can login without password

Then in the database run:

create role askbot with login encrypted password 'thepassword';
create database askbot with owner=askbot;

If you want to run tests as well, you will need to add privilege to create database:

alter role askbot with createdb;

or add the privilege in the first create role statement.