PG::ConnectionBad FATAL: role "Myname" does not exist

user3408293

I am trying to use PostgreSQL so that I can deploy to Heroku. However I cannot run localhost anymore why? I get the following message:

PG::ConnectionBad
FATAL: role "Myname" does not exist

Here is my databse.yml

development:
  adapter: postgresql
  database: my_database_development
  pool: 5
  timeout: 5000

test:
  adapter: postgresql
  database: my_database_test
  pool: 5
  timeout: 5000

production:
  adapter: postgresql
  database: my_database_production
  pool: 5
  timeout: 5000 

Here is my gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.3'

# Use pg as the database for Active Record
gem 'pg'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'rails_12factor', group: :production

It seems that pg needs me to create a user or databse however I am unable to or don't know how. Couldn't find any commands that worked for me(I'm on a windows btw)

What can I do?

user3408293

I had to go into my PG admin dashboard and create a db/user there. Unfrotunately it was in a subdirectory different from what the tutorials online said(probably updated directory destination last update). Fortunately I was able to find it and create the table/user there, update my database.yml file and then my app was able to work!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

PostgreSQL error: Fatal: role "username" does not exist

From Java

psql: FATAL: role "postgres" does not exist

From Dev

PG::UndefinedTable: ERROR: relation does not exist

From Dev

psql: FATAL: role "vagrant" does not exist

From Dev

PG::ConnectionBad FATAL: role "BetBook3" is not permitted to log in

From Dev

Postgres. role "root" does not exist. When trying to pg:pull database from Heroku

From Dev

FATAL: role "root" does not exist

From Dev

PostgreSQL error Fatal: role “username” does not exist

From Dev

PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

From Dev

Rails: PG::UndefinedTable: ERROR: relation "..." does not exist

From Dev

Could not connect to database postgres: FATAL: role"_postgres" does not exist

From Dev

Switched to PG! DB migration error: PG::ConnectionBad:

From Dev

Docker - PG::ConnectionBad

From Dev

PG::UndefinedTable: ERROR: relation "musicians" does not exist

From Dev

FATAL: database does not exist

From Dev

pg_restore error: role XXX does not exist

From Dev

function does not exist in pg_proc in postgresql

From Dev

Ruby TCP server - ERROR:PG::ConnectionBad: FATAL: remaining connection slots are reserved for non-replication superuser connections

From Dev

Postgresql: FATAL: role does not exist

From Dev

psql: FATAL: role "vagrant" does not exist

From Dev

Heroku pg:psql command throwing psql: FATAL: database "'" does not exist

From Dev

Pg:Error column does not exist

From Dev

Sidekiq PG::UndefinedColumn: ERROR: does not exist

From Dev

PG::ConnectionBad FATAL: role "Myname" does not exist

From Dev

Fatal: Heroku repository does not exist

From Dev

PostgreSQL getting error during pg_restore using pgadmin pg_restore: [archiver (db)] could not execute query: ERROR: role does not exist

From Dev

PG::ConnectionBad error

From Dev

Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

From Dev

PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

Related Related

  1. 1

    PostgreSQL error: Fatal: role "username" does not exist

  2. 2

    psql: FATAL: role "postgres" does not exist

  3. 3

    PG::UndefinedTable: ERROR: relation does not exist

  4. 4

    psql: FATAL: role "vagrant" does not exist

  5. 5

    PG::ConnectionBad FATAL: role "BetBook3" is not permitted to log in

  6. 6

    Postgres. role "root" does not exist. When trying to pg:pull database from Heroku

  7. 7

    FATAL: role "root" does not exist

  8. 8

    PostgreSQL error Fatal: role “username” does not exist

  9. 9

    PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

  10. 10

    Rails: PG::UndefinedTable: ERROR: relation "..." does not exist

  11. 11

    Could not connect to database postgres: FATAL: role"_postgres" does not exist

  12. 12

    Switched to PG! DB migration error: PG::ConnectionBad:

  13. 13

    Docker - PG::ConnectionBad

  14. 14

    PG::UndefinedTable: ERROR: relation "musicians" does not exist

  15. 15

    FATAL: database does not exist

  16. 16

    pg_restore error: role XXX does not exist

  17. 17

    function does not exist in pg_proc in postgresql

  18. 18

    Ruby TCP server - ERROR:PG::ConnectionBad: FATAL: remaining connection slots are reserved for non-replication superuser connections

  19. 19

    Postgresql: FATAL: role does not exist

  20. 20

    psql: FATAL: role "vagrant" does not exist

  21. 21

    Heroku pg:psql command throwing psql: FATAL: database "'" does not exist

  22. 22

    Pg:Error column does not exist

  23. 23

    Sidekiq PG::UndefinedColumn: ERROR: does not exist

  24. 24

    PG::ConnectionBad FATAL: role "Myname" does not exist

  25. 25

    Fatal: Heroku repository does not exist

  26. 26

    PostgreSQL getting error during pg_restore using pgadmin pg_restore: [archiver (db)] could not execute query: ERROR: role does not exist

  27. 27

    PG::ConnectionBad error

  28. 28

    Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

  29. 29

    PG::ConnectionBad: FATAL: Ident authentication failed for user "rails_dev"

HotTag

Archive