Preventing Unauthorized Access: Managing Database Connections in Production Environments