• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Is it me or is PostgreSQL a steaming POS?

her209

No Lifer
Maybe I'm doing something wrong, but all I'm doing is trying to create a user and create a database. WTF!?

On CentOS 4.8, after installing postgresql-server, postgresql, and postgresql-libs, I start the PostgreSQL server (starts fine):
Code:
/etc/init.d/postgresql start
Next I connect:
Code:
su postgres
I create a user that can create databases but not other users (which works):
Code:
createuser -A -d -E -P testuser
I then attempt to create a database as that user (which fails):
Code:
createdb -U testuser -W testdb
Here is the error:
Code:
createdb: could not connect to database template1: FATAL:  IDENT authentication failed for user "testuser"
I've Google'd around and found several people suggesting changing the pg_hba.conf file which I've tried to no avail. I've disabled the iptables firewall completely and still no luck. WTF am I doing wrong? It shouldn't be this hard.
 
After reading document on Client Authentication and some experimenting, I am able to create the database as the specified user in the createdb command by changing the authentication from ident to md5 in the pg_hba.conf file.
 
Back
Top