Menu

DB Error, could not connect to database

Help
nicbot
2009-07-09
2013-04-24
  • nicbot

    nicbot - 2009-07-09

    Ubuntu 9.04 Server LAMP
    PostgreSQL version 8.3.7
    bandwidthd-pgsql 2.0.1+cvs20071208-3
    **Installed/Uninstalled a few times to no avail**

    Everything seems to be installed and running now, but I keep receiving the following error when I attempt to hit the web interface @ http://<my server IP>/bandwidthd/index.php :

    "Warning: pg_pconnect() [function.pg-pconnect]: Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "bandwidthdpgsql" in /var/www/bandwidthd/include.php on line 16  DB Error, could not connect to database"

    The "bandwidthdpgsql" database is being populated with data.  I'm pretty sure I have the /etc/bandwidthd/bandwidthd.conf configured correctly for the DB access:

    :::::::::::
    # Standard postgres connect string, just like php, see postgres docs for
    # details
    #pgsql_connect_string "user = someuser dbname = mydb host = localhost"

    pgsql_connect_string "user = bandwidthdpgsql password = <mypass> dbname = bandwidthdpgsql host = localhost"
    ::::::::::::::::::::::::

    I'm really stuck here.  I've searched the interwebs and have come up with little.

    I'm admittedly a bit of a linux noob, but I really want and need to get this working.

     
    • Fabiano Antunes

      Fabiano Antunes - 2009-07-10

      Remove the following line from your configuration, even though it is commented, the startup script looks for it and won't connect once it finds that.
      #pgsql_connect_string "user = someuser dbname = mydb host = localhost"

      By the way, this is an old issue, next time, please browse a bit before posting a dupe question.

       
    • nicbot

      nicbot - 2009-07-10

      Fabiano,

      Thank you for the quick reply, but this did not resolve my issue.  In fact nothing changed.  The same error remains after removing ;
      <#pgsql_connect_string "user = someuser dbname = mydb host = localhost"  >
      from etc/bandwidthd/bandwidthd.conf

      Any other ideas?

       
      • Fabiano Antunes

        Fabiano Antunes - 2009-07-11

        Have you already configured the 'config.conf' file under the web directory?
        Also, have you satisfied all dependencies that can be found in the documentation?
        Further than that, I have no other ideas, unless you can provide further information about the current packages and configuraton files.

         
  • fighter scoot

    fighter scoot - 2009-11-19

    mmm… interesting…

     

Log in to post a comment.