planetscale/cli

P1001: Can't reach database server at `eu-central.connect.psdb.cloud`:`3306`

felixhaeberle opened this issue · 7 comments

Hey, I want to connect prisma which the direct link approach, but that's the error I get:

felixhaberle@MacBook-Pro-von-Felix ~/D/g/backstage (main) [1]> npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "stage" at "eu-central.connect.psdb.cloud:3306"

Error: P1001: Can't reach database server at `eu-central.connect.psdb.cloud`:`3306`

Please make sure your database server is running at `eu-central.connect.psdb.cloud`:`3306`.

also the proxy approach doesnt work:

felixhaberle@MacBook-Pro-von-Felix ~/D/g/backstage (main) [SIGINT]> npx prisma db push
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "stage" at "127.0.0.1:3309"

Error: P1001: Can't reach database server at `127.0.0.1`:`3309`

Please make sure your database server is running at `127.0.0.1`:`3309`.

I already found planetscale/discussion#139 but setting a connect_timeout doesn't work.

Thank you!!

What did you set the connect_timeout value to?
Can you connect with some other database UI or Client?

I set it to 60. What do you mean by other database ui or client? It now simply waits 60sec before giving this error.

https://dbeaver.com/ for example as a database UI. Or any other Node database client that you can feed these database credentials, for example https://www.w3schools.com/nodejs/nodejs_mysql.asp

I wanted to follow-up on this, @felixhaeberle did you ever get this resolved?

Same Problem here, It happens too frequently.

Can't reach database server at us-east.connect.psdb.cloud:3306

Please make sure your database server is running at us-east.connect.psdb.cloud:3306.

Since this isn't specifically a CLI problem & we've had no updates in a while, going to close this issue. If anyone else finds this and is having the same problem, please let us know here: https://support.planetscale.com/hc/en-us.

The specifics are generally unique to the programming language being used to create the connection / or network conditions, we can debug easier over email.

This was indeed a problem in my network settings that connections this specific connection/port was blocked. Common in public networks like schools / government etc.