Manipulating production database with fly.io and wasp db studio
@kapa.ai
I used the Wasp CLI to deployed my db (
Run
Put
However I got
When I run
My question is:
Thanks!
I used the Wasp CLI to deployed my db (
skyblaze-db). I followed the tutorial by:Run
fly proxy 5432 -a skyblaze-db and got Proxying local port 5432 to remote [skyblaze-db.internal]:5432Put
DATABASE_URL in my .env.server: DATABASE_URL=postgres://postgres:<password>@localhost:5432/skyblaze-db However I got
When I run
wasp db studio. My question is:
- is the database password something I got when first deployed to fly.io, with 15 characters? I got the message ```Postgres cluster skyblaze-db is now attached to skyblaze-serverThe following secret was added to skyblaze-server:DATABASE_URL=postgres://skyblaze_server:<credential>@skyblaze-db.flycast:5432/skyblaze_server?sslmode=disablePlease take note of your database credentials above, as they will not be available in plaintext again. Press any key to continue.```
- If so, which sould be correct? `DATABASE_URL=postgres://postgres:<credential>@localhost:5432/skyblaze-db`or`DATABASE_URL=postgres://skyblaze_server:<credential>@skyblaze-db.flycast:5432/skyblaze_server?sslmode=disable`
- How should I fix the ```
--- [Error] Can not connect to database: ---------------------------------------
wasp start db.```?Thanks!