Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pNJZo-0008SD-Nw for pgsql-general@arkaria.postgresql.org; Wed, 01 Feb 2023 20:19:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pNJZn-0004rw-NG for pgsql-general@arkaria.postgresql.org; Wed, 01 Feb 2023 20:19:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pNJZn-0004rd-8u for pgsql-general@lists.postgresql.org; Wed, 01 Feb 2023 20:19:27 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pNJZk-0006ep-Ny for pgsql-general@lists.postgresql.org; Wed, 01 Feb 2023 20:19:26 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 123-20020a4a0681000000b004faa9c6f6b9so2067039ooj.11 for ; Wed, 01 Feb 2023 12:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=pljTg2w2koMc52pkmt7FS0Ax8wR4P7i24IKuSC1ZaSE=; b=nhBm7kbWRHq85PuUSEzk3v07xLIuWEk+ynN9C6LSAwRz8C1URufNFbtlp6sFz/peRE b2tqgNykSQk4DoKTxErGigvFwujeFA7KBejJQ0U4i1XdkMidh9E4mX9oASWPL1SK6ewy Rf7I14CpqjZHZAuD3Dy19IkH+DwbwTKEOQkEqlaM5HMIw/MwdZhhTybi2fJ4WqGRX25g ZZaMRcSHAAonOc+ojHgpYuCpq082mFB21BSmu5e7g/UYy/2Bdp5JR8/0aO7wxvaIyk5E z+9IWuV/nvaxXWSiOrGRcwjq5FwVqLBhWx0gwFtRfZAXoisJXqqKMQdgMaGYKSe5jCf6 MXVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pljTg2w2koMc52pkmt7FS0Ax8wR4P7i24IKuSC1ZaSE=; b=lr8SzcrOjQ+aVMtxw6VPlfDmJoDZsGX8sKvqgXPoyiFMib26P92M/NPuKIkQ2FKbhS xbB3qvSDaTpcCzvLEdBYgNDLQpq5UY9fb8nnPhq6BgvCO07i/O//0nQKHEY7rhA3OUYQ 7MN1uYdvgnpJMdmhg5YnXFTorGSoai78k0UllJNszXRh0oWSVZkOjmuLT9DdsY72WKqN KmCOAe2OrBSbO1gPOcAlvHEGYdS4sek5/1tJEdQcQXctFOJ1/NNCeaa1eILcLl50DZyf UO1dAfyXuK1O2EHw/EoUfz9MOINSRyVKB/Rpm9z8kwKV+UIX8MAgFR2scKoqwnOhLR7l fxhQ== X-Gm-Message-State: AO0yUKViLFOiERNFBaQz6wSP0Cpm4JK4RsVe07xEBqhtdxKsrxjMnK4J t0XvHI/CM78iRzxzsq0eoPPr2aaxAeg= X-Google-Smtp-Source: AK7set+H9bDHWMe1DRHu/+KcSjyyS0gxMNPN2fckMPPG0N2KE/dVPO63Fvjx8XQIZg8c3lmF0m+45Q== X-Received: by 2002:a4a:a70a:0:b0:517:b1f4:9e72 with SMTP id g10-20020a4aa70a000000b00517b1f49e72mr1865472oom.8.1675282763707; Wed, 01 Feb 2023 12:19:23 -0800 (PST) Received: from smtpclient.apple ([177.156.239.153]) by smtp.gmail.com with ESMTPSA id w6-20020a4ab6c6000000b004fc4000ae48sm7684806ooo.15.2023.02.01.12.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 12:19:23 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-EC6BAE58-F37A-45BA-810F-3DA7D2EBAB24 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: FATAL: database "xxx" does not exist when it does From: Rodrigo Luna In-Reply-To: Date: Wed, 1 Feb 2023 17:19:10 -0300 Cc: pgsql-general@lists.postgresql.org Message-Id: <6F448A7A-2185-4BB8-8F52-94DA554DC6DE@gmail.com> References: To: Siddharth Jain X-Mailer: iPhone Mail (20D47) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-EC6BAE58-F37A-45BA-810F-3DA7D2EBAB24 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Change the owner to xxx too. Rodrigo Dev Visite: https://rodrigoluna.net.br YouTube: GamesBR > Em 1 de fev. de 2023, =C3=A0(s) 17:15, Rodrigo Luna escreveu: >=20 > =EF=BB=BFEven on the create role you set login? >=20 > Rodrigo Dev > Visite: https://rodrigoluna.net.br > YouTube: GamesBR >=20 >> Em 1 de fev. de 2023, =C3=A0(s) 17:13, Siddharth Jain escreveu: >>=20 >> =EF=BB=BF >>>=20 >>>=20 >>>> using Postgres 14.4, I created a database as the postgres user: >>>>=20 >>>> create database xxx; >>>>=20 >>>> postgres=3D> \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". >>>>=20 >>>> i gave all privileges on xxx to user sysbench: >>>>=20 >>>> postgres=3D> GRANT ALL PRIVILEGES ON DATABASE xxx TO sysbench; >>>>=20 >>>> i can see: >>>>=20 >>>> Name | Owner | Encoding | Collate | Ctype | A= ccess privileges >>>> --------------+------------------+----------+---------+---------+------= --------------------------------- >>>> xxx | postgres | UTF8 | C.UTF-8 | C.UTF-8 | =3DTc/= postgres + >>>> | | | | | postg= res=3DCTc/postgres + >>>> | | | | | sysbe= nch=3DCTc/postgres >>>>=20 >>>> but user sysbench is not able to connect to this database: >>>>=20 >>>> sysbench=3D> \c xxx >>>> FATAL: database "xxx" does not exist >>>> Previous connection kept >>>>=20 >>>> how can i fix this? --Apple-Mail-EC6BAE58-F37A-45BA-810F-3DA7D2EBAB24 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Change the owner to xxx too.

Rodrigo Dev
Visite: https://rodrigoluna.net.br
YouTu= be: GamesBR

Em 1 d= e fev. de 2023, =C3=A0(s) 17:15, Rodrigo Luna <rodrigomrluna78@gmail.com&= gt; escreveu:

=EF=BB=BFEven on the create role you set login?

R= odrigo Dev
Visite: https://rodrigoluna.net.br
YouTube: GamesBR=

Em 1 de fev. de 2= 023, =C3=A0(s) 17:13, Siddharth Jain <siddhsql@gmail.com> escreveu:
=EF=BB=BF=


using Postgres 14.4, I created a database as the postgres user:

<= /div>
create database xxx;

postgres=3D> \c x= xx
psql (13.9 (Debian 13.9-0+deb11u1), server 14.4)
WARNING: psql majo= r version 13, server major version 14.
         = Some psql features might not work.
SSL connection (protocol: TLSv1.3, cip= her: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now con= nected to database "xxx" as user "postgres".

i g= ave all privileges on xxx to user sysbench:

postgre= s=3D> GRANT ALL PRIVILEGES ON DATABASE xxx TO sysbench;
i can see:

Name     |   &= nbsp;  Owner       | Encoding | Collate |  Ctype &n= bsp;|           Access privileges
--------------= +------------------+----------+---------+---------+-------------------------= --------------
 xxx         | postgres &nbs= p;       | UTF8     | C.UTF-8 | C.UTF-8 | =3DTc/pos= tgres                     &= nbsp;   +
              |   &= nbsp;              |      =    |         |         | p= ostgres=3DCTc/postgres               &nbs= p;+
              |     &nbs= p;            |         &n= bsp;|         |         | sysbench=3D= CTc/postgres

but user sysbench is not able to c= onnect to this database:

sysbench=3D> \c xxx
= FATAL:  database "xxx" does not exist
Previous connection kept

how can i fix this?
= --Apple-Mail-EC6BAE58-F37A-45BA-810F-3DA7D2EBAB24--