Tuesday, August 23, 2011

Re: Could not connect postgresql database

Great job. You could've told everyone that you had a working install
and decided to break it & install from source code. but.... oh well.

OSS truly is the ultimate, when you break it you get to keep both pieces :-;


For the record: why did you install from source instead of using
Ubuntu packages ? A learning exercise? Bug-fix? Unwanted defaults?
This might help someone in the future.


Cheers/Excelsior!

On 8/23/11, SSozuer <selcuk.sozuer@gmail.com> wrote:
> I solved the problem. I just added,
> LD_LIBRARY_PATH=/usr/local/pgsql/lib
> PATH=/usr/local/pgsql/bin:$PATH
>
> lines to my .bashrc startup shell. After that there is no error.
>
> Selcuk
>
>
> On Aug 23, 10:50 pm, Landy Chapman <landy.chapm...@gmail.com> wrote:
>> I reinstalled postgresql after deleting config files.  in
>> postgresql.conf I changed this line:
>> #   listen = "localhost"
>> to read:
>>
>>    listen = "*"
>>
>> Also make sure this line is uncommented:
>>    port = 5432
>>
>> Then I restarted the server.
>>     /etc/init.d/postgresql restart
>>
>> One way to see if postgresql is running would be:
>>    lsof | grep "postgres"
>>
>> >  createdb conntest
>>
>> I asked you to create a database because  if the server ISNT running
>> you would not be able to.
>>
>> >   psql -d conntest
>>
>> As another suggested, this will try to use the postgres client.  If
>> all that worked, I would've asked you to run
>>
>>   psql  -h 127.0.0.1 -d conntest
>>
>> Which, in a DEFAULT debian lenny install result in:
>>    "psql: FATAL:  password authentication failed for user "postgres"
>>
>> I set a password for postgres:
>>    su
>>    passwd postgres
>>
>> Next I change pg_hba.conf to "trust" for localhost, restarted the
>> server, and
>>     psql  -h 127.0.0.1 -d conntest
>>
>> does work.  The last step would be to use my local IP address
>>     psql  -h 192.168.1.211 -d conntest
>>
>> This would make sure remote machines could connect also.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment