password authentication failed

Chris Angelico rosuav at
Fri Jul 17 01:53:37 CEST 2015

On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach <gary719_list1 at> wrote:
> On 07/15/2015 11:25 AM, Chris Angelico wrote:
>> You should then be able to create a regular user, and grant
>> appropriate permissions:
>> postgres=# create user archives password
>> 'traded-links-linguistics-informal';
>> postgres=# grant all on database archivedb to archives;
> I really appreciate the help Chris. I created a user archive with password
> 'xxxxxx' and changed the file accordingly. When I tried  python
> migrate I got the following error with it's traceback:
> (archivedb)root at supercrunch:~/archivedb# python migrate
> [chomp]
> django.db.utils.ProgrammingError: permission denied for relation
> django_migrations

This suggests that your new user doesn't have permissions set yet. Did
you do the grant command as listed above? If so, you may have to also
do this:

$ sudo sudo -u postgres psql archivedb
postgres=# grant all on all tables in schema X to archives;

Replace X with the name of the database schema you use - possibly
"public" or some other user name. You can list multiple schema names,
separated by commas, if you need to.

To list all schemas in the database:

select distinct table_schema from information_schema.tables;

Hope that helps!


More information about the Python-list mailing list