Re: psql on Mac

From: Jeff Frost <jeff(dot)frost(at)gmail(dot)com>
To: ozan(dot)kah(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql on Mac
Date: 2018-10-21 15:47:52
Message-ID: CABEGHMFnoy3zmzY_WwUVt_Eq+8RF36soapyt8CPit9pkWaY_XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-novice

Please don't remove the list from the Cc field.

Since you set it to trust in the pg_hba.conf file, it should work for any
local OS user.

If you want other DB users, you need to create them.

BTW, this is definitely not a bug and would have been better suited for the
pgsql-novice list.

On Sun, Oct 21, 2018 at 12:45 AM Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com>
wrote:

> Thank you, this works!
>
> Can I make it work also for any user?
>
> Cheers,
> Ozan
>
>
> =========================================
> Ozan Kahramanoğulları, PhD
> http://sites.google.com/site/ozankahramanogullari/
> -----------------------------------------------------------------------
> University of Trento, Department of Mathematics
> =========================================
>
>
> On Sat, 20 Oct 2018 at 22:46, Jeff Frost <jeff(dot)frost(at)gmail(dot)com> wrote:
>
>> psql -U postgres
>>
>> is probably what you want.
>>
>> On Fri, Oct 19, 2018 at 7:58 AM Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am behind a Mac, and I have been trying to get a local server running
>>> by following an internet tutorial (which also uses Mac, this one<
>>> https://video.cs50.net/web/2018/spring/lectures/>).
>>>
>>> I simply try to run psql on the terminal, and I get various error
>>> messages, depending on how I mess up the file "pg_hba.conf", for example by
>>> adding the following lines to it, among others:
>>>
>>> local postgres postgres trust
>>> local all postgres trust
>>>
>>> I have spent the whole morning browsing the internet to find a solution
>>> to my problem, and I also tried backtracking from version 11 of PostgreSQL
>>> to version 10. I am pasting below some of the error messages that I get.
>>> The version 10 warns for no support for Mac; is that the problem?
>>>
>>> Perhaps, it is me who hasn't been able to dig out the right information
>>> from the internet. However, I must say that I am quite surprised that
>>> things get so tedious immediately. I will thus be glad if you could help me
>>> with getting this running, perhaps by providing some up-to-date
>>> documentation.
>>>
>>> Thanks,
>>> Ozan
>>>
>>>
>>> XX:src3 ozan$ psql
>>>
>>> Password:
>>>
>>> sql: FATAL: password authentication failed for user "ozan"
>>>
>>> XX:src3 ozan$ psql
>>>
>>> Password:
>>>
>>> psql: FATAL: password authentication failed for user "ozan"
>>>
>>> XX:src3 ozan$ sudo -u postgres psql
>>>
>>> Password:
>>>
>>> Sorry, try again.
>>>
>>> Password:
>>>
>>> sudo: 1 incorrect password attempt
>>>
>>> XX:src3 ozan$ sudo -u postgres psql
>>>
>>> Password:
>>>
>>> Sorry, try again.
>>>
>>> Password:
>>>
>>> could not identify current directory: Permission denied
>>>
>>> Password:
>>>
>>> could not identify current directory: Permission denied
>>>
>>> psql: could not find own program executable
>>>
>>> XX:src3 ozan$ sudo -u postgres psql
>>>
>>> could not identify current directory: Permission denied
>>>
>>> Password:
>>>
>>> could not identify current directory: Permission denied
>>>
>>> psql: could not find own program executable
>>>
>>> XX:src3 ozan$ psql
>>>
>>> Password:
>>>
>>>
>>>
>>>
>>>
>>>
>>> =========================================
>>> Ozan Kahramanoğulları, PhD
>>> http://sites.google.com/site/ozankahramanogullari/
>>> -----------------------------------------------------------------------
>>> University of Trento, Department of Mathematics
>>> =========================================
>>>
>>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Keith Fiske 2018-10-22 02:33:28 Re: FreeBSD 11 compiling from source cannot find readline headers
Previous Message Jeff Frost 2018-10-20 20:46:29 Re: psql on Mac

Browse pgsql-novice by date

  From Date Subject
Next Message Ozan Kahramanogullari 2018-10-23 15:08:58 Re: psql on Mac
Previous Message Jeff Frost 2018-10-20 20:46:29 Re: psql on Mac