Page 1 of 1

Unable to connect to database

PostPosted: Wed Apr 23, 2008 3:32 pm
by stringest
"Connection refused"

PT was working fine for me until i had to do a repair install on my computer(xp pro). it crashed during an sp1 install. now i'm getting the 101 -SQLSTATE=08001 error, i've tried starting postgresql manually in admin services but windows says the service "started then stopped"

where should i go from here?

Re: Unable to connect to database

PostPosted: Wed Apr 23, 2008 4:09 pm
by ptrack pat
Did you backup this PostgreSQL database before reinstalling Windows or anytime recently?

Go to the c:\program files\postgresql\8.2\data folder and if there is a file called postmaster.pid there delete it and then restart your PC and try to start the service again.

Re: Unable to connect to database

PostPosted: Wed Apr 23, 2008 4:18 pm
by stringest
yes, i backed up the db recently, within the last 2 sessions. i followed your directions but am unable to locate the file "postmaster.pid"

i see a "postmaster.opts"...

Re: Unable to connect to database

PostPosted: Wed Apr 23, 2008 4:22 pm
by ptrack pat
That's not it.

If you have a recent backup file then I would suggest you ZIP the current contents of the c:\program files\postgresql\8.2\data folder just to have a backup of this folder and all sub-folders.

Then you should uninstall PostgreSQL using the Start > Settings > Control Panel > Add or Remove Programs window.
Delete the remnants of the c:\program files\postgresql\8.2 folder afterwards.
Then reinstall PostgreSQL from scratch ( http://www.pokertracker.com/products/PT ... InstallSQL )
After that, use the Start > Programs > PostgreSQL 8.2 > Config Files > edit pg_hba.conf option to edit this file and change both places at the bottom where it says "MD5" to say "trust" and save the changes.
Finally, go into PT (you will probably get a db error that the database wasn't found but that's OK) and use the Utilities > PostgreSQL Database Functions window to restore from the last .backup file you have made.
Then you will probably have to close and reopen PT.