Error: P1010: User `<username>` was denied a...
# orm-help
w
Error: P1010: User
<username>
was denied access on the database
<databasename>.public
j
Are Postgres premissions scoped to a hostname maybe?
I think I remember something like that in MySQL, where you grant right to a user on a hostname/IP.
w
Maybe, I'm not that good with postgres/sql - that's the main reason I use Prisma anyway
Trying to learn tho 😉
j
So just to reconfirm: Exact same CLI command works with
localhost
but not with
127.0.0.1
in the connection URL?
w
No, I meant like the ipv4 address to my server
I'm using a vps to test/host my stuff
j
Ah ok, so
<http://servername.provider.com|servername.provider.com>
works but
123.98.76.54
does not in the connection URL?
w
I haven't tested out the hostname yet but let me do that
j
What did work then? From your description I though it was the same server, but different ways to connect.
w
Basically, I'm trying to run a docker container stuff - and yk in the docker container you can't access the stuff
So I did a test outside of the docker container
j
Does the connection you are trying work with other database UIs like DBeaver or similar? Some databases only allow specific hostnames or IPs, or not via IP etc. Then you can exclude Prisma as the source of the problem.
w
where I used localhost - it worked, I used the ipv4 (123.456....) address and it didn't work
j
(DBeaver also has a nice "Test connection" button)
w
I did a test connection ping through my pc and it worked, like I said it's the authentication that doesn't happen ;-;
Says it was denied access - and Error code P1010
And I don't know, I guess let me use DBeaver (I've never used it before)
j
Yeah but often there is some other server listening at that IP or hostname that does not actually know about your database and users.
So yep, sounds like a good idea to make sure it should generally work.
w
Alright I'll get back to you, just downloading DBeaver rn
👍 1
Ohh it was my mistake
I'm so used to the "*" mindset
So when I was trying to allow my IP or whatever, instead of ALL I used *
And I did this like 2 days ago lmao so I forgot
Yep just did the cli command, and it works now
j
Awesome 😄