I've set up a Postgres database (createdb askbot; create user askbot with password 'blah; grant all on database askbot to askbot). For some reason, when I tried to do syncdb, I got an error saying 'psycopg2.OperationalError: FATAL: Ident authentication failed for user "askbot"'. Anyway, I ended up adding a line to the pg_hba.conf file to fix password authentication for the askbot user.
The problem I'm having is that when I try and run python manage.py migrate, I get this error:
File "/srv/askbot/askbot/management/commands/init_postgresql_full_text_search.py", line 19, in handle_noargs cursor.execute("CREATE LANGUAGE plpgsql") psycopg2.ProgrammingError: must be owner of database askbot
Any help with this would be much appreciated.
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.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2011-02-11 18:42:12 -0500
Seen: 257 times
Last updated: Feb 11 '11
Is there a specific version of PostgreSQL required?
How to migrate from MySQL to PostgresQL?
My Askbot initialisation snafus
How migrate from postgres to mysql?
Errors during installation process (migration) with Postgresql 8.4 and 9.1
Where is the "add_tsvector_column" method pulled from?
Question missing from question_revision table!
Which is a better database to use for Askbot, PostgreSQL or MySQL, and why?
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.