Lesson 23 of 30Article10 min
SQL Database Hosting
Local SQLite or Docker is fine for learning. Production apps use hosted MySQL, PostgreSQL, or SQL Server on AWS RDS, Azure, PlanetScale, Supabase, etc.
Hosting — where databases live in production
Local SQLite or Docker is fine for learning. Production apps use hosted MySQL, PostgreSQL, or SQL Server on AWS RDS, Azure, PlanetScale, Supabase, etc.
You connect with a connection string (host, port, database, user, password). Never commit passwords to Git.
Real-life example: Hosting is renting a bank vault for school records instead of keeping papers in your bedroom drawer.
- Free tiers: Supabase (PostgreSQL), Neon, Railway, local XAMPP/WAMP for MySQL
- Always enable SSL/TLS for remote connections
- Use read-only accounts for reporting tools
- Schedule automated backups on the provider dashboard
Typical connection string shape (not real secrets)
-- postgresql://USER:PASSWORD@HOST:5432/school_db
-- mysql://USER:PASSWORD@HOST:3306/school_db
-- App env vars (example names)
-- DATABASE_URL=...
-- DB_HOST=...
-- DB_USER=...
-- DB_PASSWORD=...