Saleor: Installation Issue: role "saleor" does not exist

Created on 30 Jun 2017  路  11Comments  路  Source: mirumee/saleor

I am following the installation instructions at http://saleor.readthedocs.io/en/latest/installation.html#installation

I've done steps 1-4 with no issues, however when I try to run
python manage.py migrate
in step 5 I get the error django.db.utils.OperationalError: FATAL: role "saleor" does not exist

I am installing on mac.

All 11 comments

Hello Brandon-Guerra,

I am experiencing exactly the same problem! Would you mind telling me how you fixed this?

Thanks you

You need to create the role "saleor" with the creatuser command in postgres.
$ createuser saleor
This should fix your problem.

Thank you so very much! That seems to have solved the problem, but now this arrises:

permission denied to create extension "hstore"
HINT: Must be superuser to create this extension.

I tried doing this:
createuser --superuser saleor

but it didn't work, would you know how to fix this?

Thanks

I figured it out!

=# ALTER USER saleor WITH NOSUPERUSER;

@Pacu2 Please update the installation documentation to include the necessity of creating a PostgreSQL user (it's fine link to PostgreSQL docs instead of including a chain of commands to invoke).

hi!!.. i try all steps but the problem remains unresolved (ubuntu 16.04 core 32 bit):
y try...
sudo -i -u postgres
~$ createuser saleor
output: createuser: creation of new role failed: ERROR: role "saleor" already exists
~$ psql

ALTER USER saleor WITH NOSUPERUSER

output: ALTER ROLE

django.db.utils.OperationalError: FATAL: database "saleor" does not exist

Can you try: createdb -O saleor saleor?

great ... solved thanks now I go back to the next error (psycopg2.ProgrammingError: permission denied to create extension "hstore"HINT: Must be superuser to create this extension.)
and execute ...
~$ psql

ALTER USER saleor WITH NOSUPERUSER

output: ALTER ROLE

again, but this does not seem to work for me

UBUNTU 16.04 CORE 32bit
I resolved it by changing this...#ALTER USER saleor WITH NOSUPERUSER
for this #ALTER USER saleor WITH SUPERUSER
thanks!

@resourceldg I believe the idea above was to only use ALTER USER saleor WITH NOSUPERUSER once your migrations are complete so the user does not unnecessarily keep the superuser flag.

I recommend using a different user and overriding the DATABASE_URL while running migrate. There's no reason for the production user to have permissions to create or alter any tables, let alone drop databases.

@patrys ok thank you I already correct it

Was this page helpful?
0 / 5 - 0 ratings