Postgres connections on Unix domain socket “/tmp/.s.PGSQL.5432”?












1















I am running MacOS 10.14.1 (absolutely new to MacOS), I am unable to run psql command installed through brew, I get the following error, would love some help:



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"?


Solutions I have tried





  1. brew services start service already running


  2. brew services stop postgresql, brew services start postgresql still same error


  3. brew remove postgres, brew install postgres, psql still same error


  4. brew unlink postgresql && brew link postgresql still same error


  5. rm -f /usr/local/var/postgres/postmaster.pid my /usr/local/var/ does not contain a postgres/ folder


One more thing to note, when I brew install postgres I get a warning:



Warning: The post-install step did not complete successfully
You can try again using `brew postinstall postgresql`


running brew postinstall postgresql gives the same warning.



Hopefully provided enough information to go by, happy to provide more.










share|improve this question























  • Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

    – Dan
    Nov 25 '18 at 9:42













  • Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

    – Devatanu
    Nov 25 '18 at 9:56











  • HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

    – Devatanu
    Nov 25 '18 at 9:57


















1















I am running MacOS 10.14.1 (absolutely new to MacOS), I am unable to run psql command installed through brew, I get the following error, would love some help:



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"?


Solutions I have tried





  1. brew services start service already running


  2. brew services stop postgresql, brew services start postgresql still same error


  3. brew remove postgres, brew install postgres, psql still same error


  4. brew unlink postgresql && brew link postgresql still same error


  5. rm -f /usr/local/var/postgres/postmaster.pid my /usr/local/var/ does not contain a postgres/ folder


One more thing to note, when I brew install postgres I get a warning:



Warning: The post-install step did not complete successfully
You can try again using `brew postinstall postgresql`


running brew postinstall postgresql gives the same warning.



Hopefully provided enough information to go by, happy to provide more.










share|improve this question























  • Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

    – Dan
    Nov 25 '18 at 9:42













  • Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

    – Devatanu
    Nov 25 '18 at 9:56











  • HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

    – Devatanu
    Nov 25 '18 at 9:57
















1












1








1








I am running MacOS 10.14.1 (absolutely new to MacOS), I am unable to run psql command installed through brew, I get the following error, would love some help:



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"?


Solutions I have tried





  1. brew services start service already running


  2. brew services stop postgresql, brew services start postgresql still same error


  3. brew remove postgres, brew install postgres, psql still same error


  4. brew unlink postgresql && brew link postgresql still same error


  5. rm -f /usr/local/var/postgres/postmaster.pid my /usr/local/var/ does not contain a postgres/ folder


One more thing to note, when I brew install postgres I get a warning:



Warning: The post-install step did not complete successfully
You can try again using `brew postinstall postgresql`


running brew postinstall postgresql gives the same warning.



Hopefully provided enough information to go by, happy to provide more.










share|improve this question














I am running MacOS 10.14.1 (absolutely new to MacOS), I am unable to run psql command installed through brew, I get the following error, would love some help:



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"?


Solutions I have tried





  1. brew services start service already running


  2. brew services stop postgresql, brew services start postgresql still same error


  3. brew remove postgres, brew install postgres, psql still same error


  4. brew unlink postgresql && brew link postgresql still same error


  5. rm -f /usr/local/var/postgres/postmaster.pid my /usr/local/var/ does not contain a postgres/ folder


One more thing to note, when I brew install postgres I get a warning:



Warning: The post-install step did not complete successfully
You can try again using `brew postinstall postgresql`


running brew postinstall postgresql gives the same warning.



Hopefully provided enough information to go by, happy to provide more.







postgresql macos homebrew






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 2:00









DevatanuDevatanu

1186




1186













  • Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

    – Dan
    Nov 25 '18 at 9:42













  • Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

    – Devatanu
    Nov 25 '18 at 9:56











  • HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

    – Devatanu
    Nov 25 '18 at 9:57





















  • Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

    – Dan
    Nov 25 '18 at 9:42













  • Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

    – Devatanu
    Nov 25 '18 at 9:56











  • HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

    – Devatanu
    Nov 25 '18 at 9:57



















Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

– Dan
Nov 25 '18 at 9:42







Have you tried brew update ? That fixes a lot of issues when brew has some out of date modules. brew doctor will also solve some issues. If no luck, brew config and paste the results so we can see what version you are running and status.

– Dan
Nov 25 '18 at 9:42















Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

– Devatanu
Nov 25 '18 at 9:56





Sure have tried brew update and brew doctor (would love to know what these do - feel free to drop a reference site) ... the output of my brew config is below (I notice the last line being Xcode: N/A I remember reading something about this...

– Devatanu
Nov 25 '18 at 9:56













HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

– Devatanu
Nov 25 '18 at 9:57







HOMEBREW_VERSION: 1.8.3 ORIGIN: github.com/Homebrew/brew HEAD: 4021aa80dfbaa369ee357a955c0216f9566133ac Last commit: 8 days ago Core tap ORIGIN: github.com/Homebrew/homebrew-core Core tap HEAD: 39e578fe3c0fbde142ea94ba2a9c6184f5aef97e Core tap last commit: 12 hours ago HOMEBREW_PREFIX: /usr/local CPU: quad-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.1 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl macOS: 10.14.1-x86_64 CLT: 10.1.0.0.1.1539992718 Xcode: N/A

– Devatanu
Nov 25 '18 at 9:57














1 Answer
1






active

oldest

votes


















0














Try this



initdb /usr/local/var/postgres







share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464052%2fpostgres-connections-on-unix-domain-socket-tmp-s-pgsql-5432%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try this



    initdb /usr/local/var/postgres







    share|improve this answer






























      0














      Try this



      initdb /usr/local/var/postgres







      share|improve this answer




























        0












        0








        0







        Try this



        initdb /usr/local/var/postgres







        share|improve this answer















        Try this



        initdb /usr/local/var/postgres








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 6 at 7:13









        Armali

        7,4301137101




        7,4301137101










        answered Feb 6 at 6:33









        PrikePrike

        378




        378
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464052%2fpostgres-connections-on-unix-domain-socket-tmp-s-pgsql-5432%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            Refactoring coordinates for Minecraft Pi buildings written in Python