Test, debug, and validate database connectivity and queries. Use when diagnosing connection errors, testing configurations, or validating queries before deployment.
Specialized skill for testing, debugging, and validating database connectivity and queries.
# Test if server is reachable
ping <DB_HOST>
# Test database port
# SQL Server: 1433, PostgreSQL: 5432, MySQL: 3306
telnet <DB_HOST> <DB_PORT>
Check environment configuration:
DB_HOST=<server_name>
DB_NAME=<database_name>
DB_USER=<username>
DB_PASSWORD=<password>
DB_DRIVER=<driver_name>
# Generic connection test pattern
import os