#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    22
    Rep Power
    0

    Postgres and SuSE 8.2


    I can't use the PostgresSQL Database Server..

    when i install all the rpm's, (disc 4 and 3)
    all appear to be 0k, but, i don't know how to connect to the server
    i start the service by 3 ways

    • YaST, Runlevel editor
    • /usr/bin/postmaster -D /var/lib/pgsql/data
    • /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start


    I tried to connect using phpPgAdmin, but always appear the login screen!!!!

    I can't use the server!!!!!! and i need it
    Last edited by ti5cgo; August 13th, 2003 at 08:32 PM.
  2. #2
  3. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    Can you connect to postgres via the psql client? Are you sure it's a problem with postgres and not a configuration problem with phppgadmin?

    First verify postgres is running from the console by typing:
    ps -aux | grep -v grep | grep postgres

    if the process is returned then postgres is running. Next try connecting from the console of your box try doing:
    psql template1

    and see if you can connect. If the command for psql isn't recognized it may not be in your path so just find it and use the absolute path. BTW, if you haven't used psql before, to exit just type \q .

    If you can connect then you're almost home, it may just be that you're not starting postgres to allow tcp connections (disabled by default). Try checking the option you have set in your postgres.conf and if you need to change it, do so and restart postgres and try phppgadmin again.

    HTH,
    -b
    PostgreSQL, it's what's for dinner...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    373
    Rep Power
    11
    even if postmaster is started, don't you have to run initdb and createdb before you can connect with pg_ctl or psql?
  6. #4
  7. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    even if postmaster is started, don't you have to run initdb and createdb before you can connect with pg_ctl or psql?
    Yup.
    PostgreSQL, it's what's for dinner...
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    22
    Rep Power
    0
    OK, thanks,

    Now i can connect with "psql template1"

    but, when i try to use frontend appz, like knoda i can't connect.

    in This part of the config file of phpPgAdmin, i wrote $conf['servers'][0]['host'] = '192.168.0.10', or my host name, and i can't connect, how to set the hostname???

    pg_hba.conf or postgres.conf problem????????

    $conf['servers'][0]['desc'] = 'PostgreSQL'; // Display name for server
    $conf['servers'][0]['host'] = ''; // Hostname or IP address for server. // Null or '' indicates UNIX domain // socket.
    $conf['servers'][0]['port'] = 5432; // Database port on server
    $conf['servers'][0]['defaultdb'] = 'template1'; //
  10. #6
  11. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    Ok, well since you're putting in 192.168.0.10 I'm assuming that the database is not local to the machine serving up phppgadmin. Is this correct?

    Try checking the postgresql.conf file to see if you're allowing tcp connections, in your conf file it should be uncommented and set to
    tcpip_socket = true .

    If you need to change it restart postgres and then try again. If you still can't login it might be your authentication settings within pg_hba.conf. If you can do psql template1 without logging in you might have trust always on for local connections, but if phppgadmin is on a different machine then you're going to need to add an entry for tcp connections to trust (this is bad and you shouldn't do this, unless you're just testing) or your preferred method of authentication.

    AFAIK, your phppgadmin config seems ok otherwise.

    HTH,
    -b
    PostgreSQL, it's what's for dinner...
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    22
    Rep Power
    0
    thx!!,

IMN logo majestic logo threadwatch logo seochat tools logo