Postgres issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Postgres issue

Piyush Chowhan
FATAL:  Peer authentication failed for user "admin"
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"bookingsaround_diy_development", "username"=>"admin", "password"=>"password"}
rake aborted!
PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"

Tasks: TOP => db:create

Any help

Not able run rake db:setup command failing to run.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4bf2af19-9936-4291-958f-3e24c93ecc63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Postgres issue

Mike Simkins
Peer Authentication used your OS username and password for access, you may need to change pg_hba.conf and change instances of peer to md5.

This also assumes that the user has been created correctly in the PostgreSQL system.

It may also help to use the lines

host: localhost
port: 5432

In your database.yaml

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f33f3663-cd16-44e8-8fce-aeb7d9cfd027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Postgres issue

Hassan Schroeder-2
In reply to this post by Piyush Chowhan
On Mon, Aug 6, 2018 at 10:59 PM, Piyush Chowhan
<[hidden email]> wrote:
> FATAL:  Peer authentication failed for user "admin"
> Couldn't create database for {"adapter"=>"postgresql",
> "encoding"=>"unicode", "database"=>"bookingsaround_diy_development",
> "username"=>"admin", "password"=>"password"}
> rake aborted!
> PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"

> Any help

Have you tried logging in from a shell with those credentials?

Did you really intend to use peer auth on your system? Postgres
offers a variety of authentication schemes; "trust" might be more
appropriate for dev work, but up to you.

--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Postgres issue

Piyush Chowhan
Ya, I have tried with the login from the shell which I have given in the database.yml file.

On Tue, Aug 7, 2018 at 7:58 PM, Hassan Schroeder <[hidden email]> wrote:
On Mon, Aug 6, 2018 at 10:59 PM, Piyush Chowhan
<[hidden email]> wrote:
> FATAL:  Peer authentication failed for user "admin"
> Couldn't create database for {"adapter"=>"postgresql",
> "encoding"=>"unicode", "database"=>"bookingsaround_diy_development",
> "username"=>"admin", "password"=>"password"}
> rake aborted!
> PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"

> Any help

Have you tried logging in from a shell with those credentials?

Did you really intend to use peer auth on your system? Postgres
offers a variety of authentication schemes; "trust" might be more
appropriate for dev work, but up to you.

--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards
Piyush Chowhan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Postgres issue

khizer Mehdi
Piyush,

As Mike suggested, can you set host,port setting  explicitly  in database.yml and 
can you re run rake db:create

On Tue 7 Aug, 2018, 8:15 PM Piyush Chowhan, <[hidden email]> wrote:
Ya, I have tried with the login from the shell which I have given in the database.yml file.

On Tue, Aug 7, 2018 at 7:58 PM, Hassan Schroeder <[hidden email]> wrote:
On Mon, Aug 6, 2018 at 10:59 PM, Piyush Chowhan
<[hidden email]> wrote:
> FATAL:  Peer authentication failed for user "admin"
> Couldn't create database for {"adapter"=>"postgresql",
> "encoding"=>"unicode", "database"=>"bookingsaround_diy_development",
> "username"=>"admin", "password"=>"password"}
> rake aborted!
> PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"

> Any help

Have you tried logging in from a shell with those credentials?

Did you really intend to use peer auth on your system? Postgres
offers a variety of authentication schemes; "trust" might be more
appropriate for dev work, but up to you.

--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards
Piyush Chowhan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABRbsVnnVMHkh2hURyVx%2BNKuK7gh2B5Hnv0i9dh9wJAHrTvMuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Postgres issue

Piyush Chowhan

In terminal I have created a role user and password what I have given in database.yml file by this command below and I solved the problem. Thanks for your reply.
psql -U postgres ------ run console

CREATE ROLE XXXX WITH LOGIN SUPERUSER PASSWORD 'XXXXX'; ------- to create a role


On Wednesday, August 8, 2018 at 5:47:17 PM UTC+5:30, mehdi wrote:
Piyush,

As Mike suggested, can you set host,port setting  explicitly  in database.yml and 
can you re run rake db:create

On Tue 7 Aug, 2018, 8:15 PM Piyush Chowhan, <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">peyushc...@...> wrote:
Ya, I have tried with the login from the shell which I have given in the database.yml file.

On Tue, Aug 7, 2018 at 7:58 PM, Hassan Schroeder <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hassan.s...@...> wrote:
On Mon, Aug 6, 2018 at 10:59 PM, Piyush Chowhan
<<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">peyushc...@...> wrote:
> FATAL:  Peer authentication failed for user "admin"
> Couldn't create database for {"adapter"=>"postgresql",
> "encoding"=>"unicode", "database"=>"bookingsaround_diy_development",
> "username"=>"admin", "password"=>"password"}
> rake aborted!
> PG::ConnectionBad: FATAL:  Peer authentication failed for user "admin"

> Any help

Have you tried logging in from a shell with those credentials?

Did you really intend to use peer auth on your system? Postgres
offers a variety of authentication schemes; "trust" might be more
appropriate for dev work, but up to you.

--
Hassan Schroeder ------------------------ <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hassan.s...@...
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
To post to this group, send email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAptYOP9F%2BSA-355%3D1Xaioj1yrMOzy0vr314k4R0MUwSg%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Thanks & Regards
Piyush Chowhan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
To post to this group, send email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="TxoH95b4AAAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/CACL5WfZph74YVLCpWDJ1ibwvhMukRkmKyO__3Vob4pnOLZKErg%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe9c1767-82c9-4be4-b0d7-4160a9a82b43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.