Files
explorer-monorepo/QUICK_FIX.md

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

  1. Test connection:

    PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
    
  2. 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
    
  3. Restart server:

    pkill -f api-server
    cd explorer-monorepo/backend
    export DB_PASSWORD='L@ker$2010'
    ./bin/api-server
    
  4. Verify:

    curl http://localhost:8080/health
    

Two Separate Systems

  • Blockscout: User blockscout, Password blockscout, DB blockscout
  • Custom Explorer: User explorer, Password L@ker$2010, DB explorer

See docs/DATABASE_CONNECTION_GUIDE.md for full details.