Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8338957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:45:05+00:00 2026-06-09T04:45:05+00:00

this is the error I get when I’m trying to connect to my local

  • 0

this is the error I get when I’m trying to connect to my local postgresql db:

Cannot connect to database [default]

this is the database configuration. I’m convinced that there is not typo (fat finger error):

db.default.url="postgres://localhost:5432/myproject/"
db.default.user="postgres"
db.default.pass="mypassword"
db.default.driver="org.postgresql.Driver"
db.default.initSQL="SELECT 1" 

where is the problem? with pgAdmin I can connect easily
p.s.
I’m using ubuntu. I’ve noticed that in order to change to postgres user
I must use “su”, otherwise it fails changing the current user.
is that has something to do with play! failure to connect my db?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:45:07+00:00Added an answer on June 9, 2026 at 4:45 am

    There might be two things wrong or at least dubious in your setup.

    First: The postgres:... URL syntax is not a plain JDBC URL. This format is not understood by the PostgreSQL JDBC driver. See this answer to a similar problem.

    Second: You are trying to use the PostgreSQL superuser account for Play. The superuser account should be used only for administrative work, but not “normal” work. Especially not for work which includes public access to the DB via some webfrontend. Any SQL-Injection attack gives the attacker the golden key to your database – including the nuke to wreck your complete DB cluster at once or install any backdoor into you DB server.

    So I recommand, that you create a new user which you configure in your Play! settings.

    That said: The default password for the postgres user is not set on Ubuntu. This setup allows login to the DB user only from the same OS user. How you can fix this is explained in this answer.

    If these two tips don’t help: The error you quoted is very vague. There must be more detailed error logs somewhere. Please find them and attach them to your question with the “edit” button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i get this error Cannot open database DataLayer.Context.MedicallexiconContext requested by the login. The login
This is the error I get while trying to access a sqlite database from
I always get this error when trying to compile my file with Boost::GIL PNG
I'm trying to abort a task in ada program but I get this error
Trying to track down this error I get when I have NSZombieEnabled . I
I'm trying to get around this error I get from Microsoft Visual Studio 10
I'm trying to read my app preferences and I get this error: Settings activity:
I get this error: Error: defineAlreadyDefined , that only occurs with dojo. index.php <script
I need help fixing this error I get when trying to deploy my web
I am working with Rails and I cannot seem to get past this error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.