I'm running into a bizarre issue with "database XYZ does not exist."
I've done a lot of searching, but can't find the cause. For the sake
of reference, this is PG 8.4.6 running on RHEL 5.4.

Here's what I've done so far with md5 authentication enabled:

psql -U postgres -c "create user miket with password 'miket'"
createdb testingdb -U postgres
psql -U postgres -d testingdb -c "create schema testingdb authorization miket"
psql -U postgres -d testingdb -c "grant all privileges on database
testingdb to miket"

The last statement returns the following:

ERROR: database "testindb" does not exist

When I run:

psql -l -U postgres

testindb most certainly does exist.

Any help on resolving this would be greatly appreciated.

Thanks,

Mike

Search Discussions

  • Vibhor Kumar at Jan 21, 2011 at 5:09 pm

    On Jan 21, 2011, at 10:31 PM, Mike Thomsen wrote:


    psql -l -U postgres

    Plz share the output of command

    Vibhor Kumar
    EnterpriseDB Corporation
    The Enterprise Postgres Company
    Cell: +91-932-568-2279
    vibhor.kumar@enterprisedb.com
    Blog:http://vibhork.blogspot.com
  • Thom Brown at Jan 21, 2011 at 5:10 pm

    On 21 January 2011 17:01, Mike Thomsen wrote:
    I'm running into a bizarre issue with "database XYZ does not exist."
    I've done a lot of searching, but can't find the cause. For the sake
    of reference, this is PG 8.4.6 running on RHEL 5.4.

    Here's what I've done so far with md5 authentication enabled:

    psql -U postgres -c "create user miket with password 'miket'"
    createdb testingdb -U postgres
    psql -U postgres -d testingdb -c "create schema testingdb authorization miket"
    psql -U postgres -d testingdb -c "grant all privileges on database
    testingdb to miket"

    The last statement returns the following:

    ERROR:    database "testindb" does not exist

    When I run:

    psql -l -U postgres

    testindb most certainly does exist.

    Any help on resolving this would be greatly appreciated.

    Thanks,

    Mike
    Are you sure that's not a typo. Your statement says "testingdb" but
    the error says "testindb".

    --
    Thom Brown
    Twitter: @darkixion
    IRC (freenode): dark_ixion
    Registered Linux user: #516935
  • Jean-Yves F. Barbier at Jan 21, 2011 at 5:13 pm
    On Fri, 21 Jan 2011 12:01:40 -0500, Mike Thomsen wrote:

    ...
    psql -U postgres -c "create user miket with password 'miket'"
    createdb testingdb -U postgres
    psql -U postgres -d testingdb -c "create schema testingdb authorization
    miket" psql -U postgres -d testingdb -c "grant all privileges on database
    testingdb to miket"
    I guess that if you used the 1st line you weren't 'postgres' user, so the 2nd
    line can't give anything unless issued the way the 1st is.

    --
    My way of joking is to tell the truth. That's the funniest joke in the world.
    -- Muhammad Ali
  • Mike Thomsen at Jan 21, 2011 at 5:39 pm
    I don't know what had happened to our test machine, but after I
    dropped all of the other test databases and reran those commands in
    the psql console, the user account can log in fine.

    Strange.
    On Fri, Jan 21, 2011 at 12:13 PM, Jean-Yves F. Barbier wrote:
    On Fri, 21 Jan 2011 12:01:40 -0500, Mike Thomsen wrote:

    ...
    psql -U postgres -c "create user miket with password 'miket'"
    createdb testingdb -U postgres
    psql -U postgres -d testingdb -c "create schema testingdb authorization
    miket" psql -U postgres -d testingdb -c "grant all privileges on database
    testingdb to miket"
    I guess that if you used the 1st line you weren't 'postgres' user, so the 2nd
    line can't give anything unless issued the way the 1st is.

    --
    My way of joking is to tell the truth.  That's the funniest joke in the world.
    -- Muhammad Ali

    --
    Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
    To make changes to your subscription:
    http://www.postgresql.org/mailpref/pgsql-novice

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJan 21, '11 at 5:01p
activeJan 21, '11 at 5:39p
posts5
users4
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase