1.1 KiB
1.1 KiB
Quick Fix: Database Connection
The Issue
You tried to connect with blockscout user, but the custom explorer backend uses the explorer user.
Correct Command
# ✅ Correct - for custom explorer backend
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
Quick Steps
-
Test connection:
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;" -
Run migration:
cd explorer-monorepo PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer \ -f backend/database/migrations/0010_track_schema.up.sql -
Restart server:
pkill -f api-server cd explorer-monorepo/backend export DB_PASSWORD='L@ker$2010' ./bin/api-server -
Verify:
curl http://localhost:8080/health
Two Separate Systems
- Blockscout: User
blockscout, Passwordblockscout, DBblockscout - Custom Explorer: User
explorer, PasswordL@ker$2010, DBexplorer
See docs/DATABASE_CONNECTION_GUIDE.md for full details.