Postgresql socket error when running Django's syncdb (mac OS 10.7.5)

前端 未结 2 1520
迷失自我
迷失自我 2021-01-26 01:36

I\'m trying to run Django\'s syncdb operation and am getting the following error:

psycopg2.OperationalError: could not connect to server: Permission denied
    I         


        
2条回答
  •  一整个雨季
    2021-01-26 01:57

    Found the answer courtesy of Bradley Ayers:

    • set "unix_socket_directory" to "/var/pgsql_socket/" in postgres.conf
    • executed following commands:
      • "$ sudo dscl . append /Groups/_postgres GroupMembership postgres"
      • "$ sudo chmod g+w,o+rx /var/pgsql_socket/"
    • restarted postgresql

提交回复
热议问题