ãåå¿é²ãPostgreSQLç³»(psqlãªã©)ã®ã³ãã³ããåããªãã¨ãã®å¯¾å¦æ¹æ³
ã¯ããã«
ãã®è¨äºã¯PostgreSQLã«é¢ããåå¿é²è¨äºã§ãã
â»ã¡ã¢ã«è¿ãè¨äºãªã®ã§å人çã«é±1ã«ã¦ã³ããã¼ã«ã³ã§ããã
æ¬é¡
çºçããç¾è±¡ã¨å¯¾å¦æ¹æ³ã§ãã
ç°å¢
- PostgreSQL 10
- macOS High Sierra
ç¾è±¡
PCã®å¼·å¶çµäºçãèµ·å ã§ãPostgresqlãç°å¸¸çµäºãã¦ãã¾ã£ãå ´åã次åã«Postgresqlç³»ã®ã³ãã³ããæã¤ã¨ä»¥ä¸ã®ãããªã¨ã©ã¼ã¡ãã»ã¼ã¸ï¼èµ·åã§ãã¦ãªãæ§åï¼ï¼ãåºåãããå ´åãããã
psql -l 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"?
対å¦æ¹æ³
psql: could not connect to server: No such file or directory
ã§ã°ã°ã£ã¦ã¿ãã¨ãåãç¾è±¡ã«å¯¾ãã¦ã®å¯¾å¦è¨äºãçµæ§åºã¦ãã¾ããï¼ã¨ã³ã¸ãã¢ã®ã¿ãªãããããã¨ãï¼
ãã ãPostgreSQLã®ãã¼ã¸ã§ã³ãOSãç°ãªããã¨ãåå ãªã®ãã対å¦æ¹æ³ã試ãããèªåã®ç°å¢ã§ã¯ç´ãã¾ããã§ããã
対å¦ã§ããã®ã¯ä»¥ä¸è¨äºã®æ¹æ³ã§ãããï¼æ²è¼å ã®è¨äºã¯éå ¬éè¨å®ã«ãªã£ã¦ãã¾ãããï¼
- ”psql: could not connect to server: No such file or directory"となりPostgresqlに接続できない - Qiita
- psqlでエラー発生時の対処 - のしメモ アプリ開発ブログ
対å¦æ¹æ³
cd /usr/local/Cellar/postgresql curl -o fixBrewLionPostgresql.sh http://nextmarvel.net/blog/downloads/fixBrewLionPostgres.sh chmod 777 fixBrewLionPostgresql.sh ./fixBrewLionPostgresql.sh pg_ctl -D /usr/local/var/postgres start
ããã
fixBrewLionPostgres.sh
ã§è¡ãªã£ã¦ããå¦çãã¡ããã¨èª¿ã¹ããã§ãããæ¬è¨äºã¯ã¨ããããããã¾ã§ã§ãã
åæ§ã®ã¨ã©ã¼ã«ãããããæ¹ããã®è¨äºãåèã«ãªãã°ã¨æãã¾ãã
â»PostgreSQLã触ãå§ããã®ã§PostgreSQLç³»è¨äºãå¢ããäºæããã