password authentication failed

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


On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach <gary719_list1 at verizon.net> 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';
>> CREATE ROLE
>> postgres=# grant all on database archivedb to archives;
>> GRANT
>
> I really appreciate the help Chris. I created a user archive with password
> 'xxxxxx' and changed the settings.py file accordingly. When I tried  python
> manage.py migrate I got the following error with it's traceback:
>
> (archivedb)root at supercrunch:~/archivedb# python manage.py 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!

ChrisA


More information about the Python-list mailing list