Impossible de se connecter à Postgresql sur Mac OS X après l'Installation
J'ai donc installé Postgresql sur mon Mac et chaque fois que j'exécute quelque chose comme psql
ou createdb cool_database_name
j'obtiens l'erreur suivante.
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
J'ai donc suivre les différentes solutions. J'ai réinstaller postgresql en vain. Je vais à postgresql.conf` et de le modifier pour
#port = 5432 # (change requires restart)
#max_connections = 20 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = '/var/pgsql_socket' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
mais toujours rien. J'ai exécuter des commandes comme
ls -lA /var/run/postgresql
Qui me disent que le fichier ou le répertoire n'existe pas.
Je vérifie également dans le pg_hba.conf
fichier mais tout semble ok
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication jason trust
#host replication jason 127.0.0.1/32 trust
#host replication jason ::1/128 trust
Quand je lance psql -h localhost
- je obtenir
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
Je suis à une perte quant à la façon de résoudre ce problème. Toute aide serait appréciée.
OriginalL'auteur jason328 | 2013-02-20
Vous devez vous connecter pour publier un commentaire.
Le problème, c'est que Mac OS navires PostgreSQL
Vous avez besoin de changer de CHEMIN comme ceci:
par exemple, pour Postgres.app:
Ce qui peut être utile: http://blog.ringerc.id.au/2012/09/postgresql-packaging-on-mac-os-x-is-mess.html
Pour moi, le chemin a été
/Applications/Postgres.app/Contents/Versions/9.4/bin
J'ai installé postgres d'un .dmg et a dû reporter à la section "/Bibliothèque/PostgreSQL/9.5/bin'
OriginalL'auteur mys