It would actually have been useful if it gave the mysql error as once I created a test page it was clear what the problem was. Apparently there were not enough connections left … this seems odd, does WordPress not clean up properly possibly??
Anyway, for others, I just created a test page with the following code to make it easy to test for problems in the future:
<?php
$connection = mysql_connect("serverip", "user", "pass")
or die("Connection failed because: " . mysql_error());
print ("Connection succeeded");
mysql_close($connection);
?>