Unable to connect to this database.

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Re: Unable to connect to this database.

Postby kraada » Tue Feb 08, 2011 11:59 am

In Applications -> PostgreSQL 8.4 run SQL Shell. Press enter to use the defaults and use the password you have to connect. It will drop you to a command prompt. At the prompt type:

\l

and hit enter. Paste the output here.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable to connect to this database.

Postby Osirius » Tue Feb 08, 2011 7:28 pm

Last login: Wed Feb 9 09:26:59 on ttys000
/Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Lubov-Vorontsovas-Macbook:~ Luba$ /Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Server [localhost]: \|
Database [postgres]:
Osirius
 
Posts: 9
Joined: Tue Feb 08, 2011 8:08 am

Re: Unable to connect to this database.

Postby kraada » Tue Feb 08, 2011 7:42 pm

That was one of the prompts to press enter through. Close it out, try again keep hitting enter until it says password, you enter the password and it enter and it shows a prompt ending in =# -- that's the one you'll want to type \l at.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable to connect to this database.

Postby Osirius » Wed Feb 09, 2011 6:34 am

I did as you said
If I enter password postgrespass or dbpass it shows

Last login: Wed Feb 9 20:31:47 on ttys000
/Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Lubov-Vorontsovas-Macbook:~ Luba$ /Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
Password for user postgres:
psql: FATAL: password authentication failed for user "postgres"

Press <return> to continue...
logout


If I enter password postgres it shows
Last login: Wed Feb 9 20:32:42 on ttys000
/Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Lubov-Vorontsovas-Macbook:~ Luba$ /Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
Password for user postgres:
psql (8.4.2, server 9.0.3)
WARNING: psql version 8.4, server version 9.0.
Some psql features might not work.
Type "help" for help.

postgres=# \|
Invalid command \|. Try \? for help.
postgres=# \?
General
\copyright show PostgreSQL usage and distribution terms
\g [FILE] or ; execute query (and send results to file or |pipe)
\h [NAME] help on syntax of SQL commands, * for all commands
\q quit psql

Query Buffer
\e [FILE] edit the query buffer (or file) with external editor
\ef [FUNCNAME] edit function definition with external editor
\p show the contents of the query buffer
\r reset (clear) the query buffer
\s [FILE] display history or save it to file
\w FILE write query buffer to file

Input/Output
\copy ... perform SQL COPY with data stream to the client host
\echo [STRING] write string to standard output
\i FILE execute commands from file
\o [FILE] send all query results to file or |pipe
\qecho [STRING] write string to query output stream (see \o)

Informational
(options: S = show system objects, + = additional detail)

Osirius
 
Posts: 9
Joined: Tue Feb 08, 2011 8:08 am

Re: Unable to connect to this database.

Postby kraada » Wed Feb 09, 2011 9:49 am

You were on target the second time that got you to the postgres=# prompt - however the command is \l - l as in Larry, but lowercase (in this case it's actually for list - it lists all databases on the system).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable to connect to this database.

Postby Osirius » Thu Feb 10, 2011 8:04 am

Last login: Thu Feb 10 21:54:29 on ttys001
/Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Lubov-Vorontsovas-Macbook:~ Luba$ /Library/PostgreSQL/8.4//scripts/runpsql.sh; exit
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
Password for user postgres:
psql (8.4.2, server 9.0.3)
WARNING: psql version 8.4, server version 9.0.
Some psql features might not work.
Type "help" for help.

postgres=# \l
List of databases
Name | Owner | Encoding | Collation | Ctype | Access privileges
-----------+----------+-----------+-----------+-------+-----------------------
PT3 DB | postgres | SQL_ASCII | C | C |
postgres | postgres | UTF8 | C | C |
template0 | postgres | UTF8 | C | C | =c/postgres
: postgres=CTc/postgres
template1 | postgres | UTF8 | C | C | =c/postgres
: postgres=CTc/postgres
(4 rows)

postgres=#
Osirius
 
Posts: 9
Joined: Tue Feb 08, 2011 8:08 am

Re: Unable to connect to this database.

Postby kraada » Thu Feb 10, 2011 9:57 am

Ok that's good your database is still there.

Edit the ~/Library/Application Support/PokerTracker/PokerTracker.cfg file using TextEdit - there will be a section labeled [Database]. Under there are the configurations for your current database. You want to make sure thatDB1.Postgres.Password=postgres - if it says dbpass there, the problem is your password. Setting it to postgres (the same as you used to log in via the shell), saving the file and restarting PT3 will likely fix things for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable to connect to this database.

Postby kanji405 » Thu Feb 10, 2011 9:03 pm

kraada wrote:Click Database --> Database Management --> New then click the blue Browse link. That should list any PT3 databases that exist in your PostgreSQL installation - if you find your database there you can click on it then click OK and Connect and PT3 will connect to it (and you can set it as default/active after you connect).



I am having the same problem and i tried this but got an error saying "unable to login to database: reason server closed the conncection unexpectedly
kanji405
 
Posts: 1
Joined: Thu Dec 02, 2010 1:50 pm

Re: Unable to connect to this database.

Postby Osirius » Fri Feb 11, 2011 7:26 am

Her what I have


[General]
BuildDate=2010/11/30
[Database]
Default.Postgres.Server=localhost
Default.Postgres.Port=5432
Default.Postgres.User=postgres
Default.Postgres.Password=postgres
DB1.Name=PokerTracker 3 Database
DB1.Type=postgres
DB1.Postgres.Database=PT3 DB
DB1.Postgres.Server=localhost
DB1.Postgres.Port=5432
DB1.Postgres.User=postgres
DB1.Postgres.Password=postgres
DB1.Default=Y
DB2.Name=PT3_2011_02_09_004509
DB2.Type=postgres
DB2.Postgres.Database=PT3_2011_02_09_004509
DB2.Postgres.Server=localhost
DB2.Postgres.Port=5432
DB2.Postgres.User=postgres
DB2.Postgres.Password=postgrespass
DB2.Default=
[Messages]

So now in PT3 if I choose DB1 there are no any players, if DB2 then it says that it's unable to connect to database :cry:
Osirius
 
Posts: 9
Joined: Tue Feb 08, 2011 8:08 am

Re: Unable to connect to this database.

Postby Osirius » Fri Feb 11, 2011 8:02 am

I don't get it why in default and db1 the password is postgres. In my windows7 notebook it's postgrespass and it's working ok.
Osirius
 
Posts: 9
Joined: Tue Feb 08, 2011 8:08 am

PreviousNext

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 15 guests

cron
highfalutin