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

前端 未结 2 1519
迷失自我
迷失自我 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
    0 讨论(0)
  • 2021-01-26 01:57

    your database is not running try

    pg_ctl -D /usr/local/var/postgres  start
    
    

    assuming thats where your postgre data directory is

    0 讨论(0)
提交回复
热议问题