Issues connecting Supabase to Project

Having annoying and persistent issues with connecting my Supabase project to my project that im working on locally on my pc. Ive tried the Connection String, the Transaction Pooler, and the Shared Pooler, but nothing seems to be working. I tried pinging the DB, through:
ping: db.xxxxxxxxxxxxxxx.supabase.co
ping: db.xxxxxxxxxxxxxxx.supabase.co
, but it returns: "Ping request could not find host db.xxxxxxxxxxxxx.supabase.co. Please check the name and try again.". I get a "P1001: Cant reach Database Server". Could this be an ISP issue? Can't seem to find any working solutions on SOF or reddit or anything of that sort. Very desperate at this point. I used SQLite for testing, as i had this issue in early stage of the projects development, and now that the project is done, i cant migrate or even connect to the Supabase database.
14 Replies
garyaustin
garyaustin2mo ago
Your ping is likely not working as it is an IPv6 only address (.co). You should be using the session pooler (5432) (.com) When using the session pooler make sure you pay attention to the username format of user.instanceid.
toppestg
toppestgOP2mo ago
Thank you for responding Gary. yea i copied the session pooler url and edited it to use the project password, and the user.instance id is the same. tried pinging it but got the same error that the ping request couldnt find the host.
garyaustin
garyaustin2mo ago
Not sure if pinging works or not on that port.
toppestg
toppestgOP2mo ago
Could the issue be that i first started off with using SQLite?
garyaustin
garyaustin2mo ago
I have no idea the context of that question. What are you using to connect to the database?
toppestg
toppestgOP2mo ago
Prisma not sure if thats the correct answer to your question
garyaustin
garyaustin2mo ago
Prisma for sure works with the session port for migrations and the transaction port for client db operations. https://supabase.com/docs/guides/database/prisma If you are providing a full URL then your password cannot contain special characters.
toppestg
toppestgOP2mo ago
Yea the password issue i had at first, and i had to use specific chars for things liek @,$, etc i changed the password tho to something more suitable, so without those special chars Could the issue be anything with the prisma schema itself?
garyaustin
garyaustin2mo ago
You could try something like psql to verify connection. I don't think the schema would cause a connect error.
toppestg
toppestgOP2mo ago
Will try the psql approach in a bit, have to step away from computer for a few Hey gary, sorry for the late message. So I tried the psql command, and i get
psql: error: could not translate host name "db.xxxxxxxxxxxxx.supabase.co" to address: Name or service not known"
psql: error: could not translate host name "db.xxxxxxxxxxxxx.supabase.co" to address: Name or service not known"
Tried pinging:
ping db.xxxxxxxxxxxxx.supabase.co
ping db.xxxxxxxxxxxxx.supabase.co
Ping request could not find host db.xxxxxxxxxxxxxxxx.supabase.co. Please check the name and try again.
silentworks
silentworks2mo ago
Looks like are still trying to connect to the direct connection string instead of the session pooler string.
toppestg
toppestgOP2mo ago
I am, tried the session pooler string and it seemed to have worked
toppestg
toppestgOP2mo ago
No description
toppestg
toppestgOP2mo ago
Hey, used the session pooler and it seems to be working. I was able to connect to the supa db and import all data from sqlite. Thank you guys!

Did you find this page helpful?