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 1pNJWN-0008Cx-Ap for pgsql-general@arkaria.postgresql.org; Wed, 01 Feb 2023 20:15:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pNJWM-0005FQ-9w for pgsql-general@arkaria.postgresql.org; Wed, 01 Feb 2023 20:15:54 +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 1pNJWL-0005F0-Qi for pgsql-general@lists.postgresql.org; Wed, 01 Feb 2023 20:15:53 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pNJWJ-0006cr-ID for pgsql-general@lists.postgresql.org; Wed, 01 Feb 2023 20:15:52 +0000 Received: by mail-oi1-x235.google.com with SMTP id r9so16714656oig.12 for ; Wed, 01 Feb 2023 12:15:51 -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=KaQI6U/9sCsd49D5eU84108GzctN483KDksEDXDp42o=; b=J/RxucDvUgmpXFPtXqONDBko0a1snOkGkrRiXo0Dd8VhejnhEVXuNu9LKdSjubQNYn +LC2+hjcPZvQj9bhJh0gDUiIWa+yKdm31eF6NCUY/DnpIXFpW89E7Pujj49+3SY5t+Rl VIcd+9TAg5Jt4FTYMISiRpFVOvJuOdf1wBDW4XvbsJoMnfXbN4+r55Ak78EVe5a3OP/4 FtkWP4MxE04EgMzGMkSGN6UcqcbGvjRSHBh6ThTZK3MgiceHwVFVj5y4c6X5YtDPrxIO 0N9iH4WrP/Us7TUl9OzVXDpOZWieloMMC150Cw6q+pTyvc5q7LUGUDa1vhlmCNnyhRdU lAEw== 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=KaQI6U/9sCsd49D5eU84108GzctN483KDksEDXDp42o=; b=kKxZOo/xZ3VulHl15hxjodACG3Ul5vcc0rJ+DDQNfomPdaES+mv1Z5E98IbUsX+O/n HoQzhNt6TY4J9Kcxr0wL7Lb7YxD3Gu8ir5tz1fQj6JlL2Lplab7KLLDLi8f4k3ZcY/F4 1ghNKuobabLdseV3fPLf6gC+C6P5zCGD2P1hwCLT03ifAzf17w3erjmAT2J4Z2KnG/UQ kwSZ2dweZBrfkfO+V0bEBS9TCAZsD3yiwYmc2RRbsH7YHk78p6Gr59EW4eo7rQORHRF5 XXwWbyZfFAJNMxprUzwq0hfB6uVwJAXcmDk3VA5ewX+UJkFyotT1pF+dPiEefl/CknsL KNkg== X-Gm-Message-State: AO0yUKUoRkTXyi2iFDAar+1dEuBe5sZDH8vVVgX7YeI5I+7xq0QgkXG+ 7IPHUzjQ8rIQT68qmA8x1OhCwrRzjZo= X-Google-Smtp-Source: AK7set962Vah+Sa9HCyOE6zhOCFADz7J6I5aBhtw/FGQ3Il3XvTRRVCmCfGpmzO0FMNHF/tBfPvCLw== X-Received: by 2002:a05:6808:64e:b0:35c:4ddb:b879 with SMTP id z14-20020a056808064e00b0035c4ddbb879mr1622175oih.11.1675282550439; Wed, 01 Feb 2023 12:15:50 -0800 (PST) Received: from smtpclient.apple ([177.156.239.153]) by smtp.gmail.com with ESMTPSA id w33-20020a056830412100b0068657984c22sm8268965ott.32.2023.02.01.12.15.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 12:15:49 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-84DC7F1B-CC29-4552-B6E8-D2D1564B519E 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:15:37 -0300 Cc: pgsql-general@lists.postgresql.org Message-Id: 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-84DC7F1B-CC29-4552-B6E8-D2D1564B519E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Even on the create role you set login? Rodrigo Dev Visite: https://rodrigoluna.net.br YouTube: GamesBR > 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/p= ostgres + >>> | | | | | postgr= es=3DCTc/postgres + >>> | | | | | sysben= ch=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-84DC7F1B-CC29-4552-B6E8-D2D1564B519E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Even on the create role you set login?
<= br>
Rodrigo Dev
Visite: https://rodrigoluna.net.br
=
YouTube: GamesBR

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

=EF=BB=BF

using Postgres 14.4, I created a database as the pos= tgres user:

create database xxx;

postgres=3D> \c xxx
psql (13.9 (Debian 13.9-0+deb11u1), server 14.4)<= br>WARNING: psql major version 13, server major version 14.
   =      Some psql features might not work.
SSL connection (p= rotocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: of= f)
You are now connected to database "xxx" as user "postgres".
<= div>
i gave all privileges on xxx to user sysbench:
=
postgres=3D> GRANT ALL PRIVILEGES ON DATABASE xxx TO sysbe= nch;

i can see:

Name &= nbsp;   |      Owner       | Encoding | C= ollate |  Ctype  |           Access privi= leges
--------------+------------------+----------+---------+---------+--= -------------------------------------
 xxx       = ;  | postgres         | UTF8     | C.UTF-= 8 | C.UTF-8 | =3DTc/postgres              = ;           +
         =     |                 &nb= sp;|          |         |  = ;       | postgres=3DCTc/postgres        =        +
            &= nbsp; |                  | &nbs= p;        |         |     &= nbsp;   | sysbench=3DCTc/postgres

but user= sysbench is not able to connect to this database:

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

how can i fix this?
<= /div>
= --Apple-Mail-84DC7F1B-CC29-4552-B6E8-D2D1564B519E--