django-crash-course icon indicating copy to clipboard operation
django-crash-course copied to clipboard

createdb everycheese not working on postgres 12

Open earnestat opened this issue 4 years ago • 1 comments

Location within the Book

  • Book build date (Is the date on page 1): 2020-05-14
  • Book format (PDF, Epub or Mobi): PDF
  • Chapter or Appendix: Chapter 18
  • Section: 18.5
  • Subsection: createdb everycheese

Description

Installed postgres as per the link given - wget --quiet -O- https://feld.to/pg12-ubuntu-installer | bash

This successfully installed postgresql 12

While creating everycheese database as per the instruction on section 18.5, met with a role error and this could not be resolved on ubuntu 20.04 LTS using the troubleshooting tips given at the end of the book.

createdb everycheese

Possible Solutions

  • sudo in as postgres and give the role for your user (in my case it was 'ubuntu')
  • restart postgresql
  • run createdb everycheese

$ sudo -i -u postgres postgres@ubuntuBox:~$ psql postgres=# CREATE ROLE ubuntu WITH CREATEDB LOGIN; CREATE ROLE postgres=# \q $ exit $ logout $ sudo service postgresql restart $ sudo service postgresql status $ createdb everycheese

earnestat avatar May 22 '20 12:05 earnestat

@luzfcb Can you help with this issue?

pydanny avatar Jun 05 '20 17:06 pydanny