$res = mysql_connect($this->host, $this->rootname, $this->rootpass);
if (!$res) {
throw new ServerException("Cannot connect to {$this->host} as {$this->rootname}.");
$res = mysql_connect($this->host, $this->rootname, $this->rootpass);
if (!$res) {
throw new ServerException("Cannot connect to {$this->host} as {$this->rootname}.");