server: Do not set the cvar for database ready until a test query succeeds.