Error: 'Failed to connect to database' when attempting to connect to SQL database