Skip to content

Instantly share code, notes, and snippets.

@shkbahmad
Last active October 29, 2020 17:27
Show Gist options
  • Save shkbahmad/9df8a6d0160522f5010e4de611352e5c to your computer and use it in GitHub Desktop.
Save shkbahmad/9df8a6d0160522f5010e4de611352e5c to your computer and use it in GitHub Desktop.

Error

FATAL: data directory "/usr/local/var/postgres" has group or world access

DETAIL: Permissions should be u=rwx (0700).

Solution

sudo chown -R <USERNAME> /usr/local/var/postgres

sudo chmod -R 700 /usr/local/var/postgres

Error

FATAL: database files are incompatible with server

DETAIL: The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.1.

Nuke It

rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8

Error

psql: FATAL: database "<USERNAME>" does not exist

Solution

createdb <USERNAME>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment