Re: FATAL: database "xxx" does not exist when it does

From: Rodrigo Luna <rodrigomrluna78(at)gmail(dot)com>
To: Siddharth Jain <siddhsql(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: FATAL: database "xxx" does not exist when it does
Date: 2023-02-01 20:19:10
Message-ID: 6F448A7A-2185-4BB8-8F52-94DA554DC6DE@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Change the owner to xxx too.

Rodrigo Dev
Visite: https://rodrigoluna.net.br
YouTube: GamesBR

> Em 1 de fev. de 2023, à(s) 17:15, Rodrigo Luna <rodrigomrluna78(at)gmail(dot)com> escreveu:
>
> Even on the create role you set login?
>
> Rodrigo Dev
> Visite: https://rodrigoluna.net.br
> YouTube: GamesBR
>
>> Em 1 de fev. de 2023, à(s) 17:13, Siddharth Jain <siddhsql(at)gmail(dot)com> escreveu:
>>
>> 
>>>
>>>
>>>> using Postgres 14.4, I created a database as the postgres user:
>>>>
>>>> create database xxx;
>>>>
>>>> postgres=> \c xxx
>>>> psql (13.9 (Debian 13.9-0+deb11u1), server 14.4)
>>>> WARNING: psql major version 13, server major version 14.
>>>> Some psql features might not work.
>>>> SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
>>>> You are now connected to database "xxx" as user "postgres".
>>>>
>>>> i gave all privileges on xxx to user sysbench:
>>>>
>>>> postgres=> GRANT ALL PRIVILEGES ON DATABASE xxx TO sysbench;
>>>>
>>>> i can see:
>>>>
>>>> Name | Owner | Encoding | Collate | Ctype | Access privileges
>>>> --------------+------------------+----------+---------+---------+---------------------------------------
>>>> xxx | postgres | UTF8 | C.UTF-8 | C.UTF-8 | =Tc/postgres +
>>>> | | | | | postgres=CTc/postgres +
>>>> | | | | | sysbench=CTc/postgres
>>>>
>>>> but user sysbench is not able to connect to this database:
>>>>
>>>> sysbench=> \c xxx
>>>> FATAL: database "xxx" does not exist
>>>> Previous connection kept
>>>>
>>>> how can i fix this?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-02-01 20:45:19 Re: FATAL: database "xxx" does not exist when it does
Previous Message David G. Johnston 2023-02-01 20:18:44 Re: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?