Index: branches/RC/core/kernel/db/db_connection.php =================================================================== diff -u -N -r10509 -r10921 --- branches/RC/core/kernel/db/db_connection.php (.../db_connection.php) (revision 10509) +++ branches/RC/core/kernel/db/db_connection.php (.../db_connection.php) (revision 10921) @@ -212,7 +212,7 @@ function Connect($host, $user, $pass, $db, $force_new = false) { $func = $this->getMetaFunction('connect'); - $this->connectionID = $func($host, $user, $pass, $force_new) or trigger_error("Database connection failed, please check your connection settings", E_USER_ERROR); + $this->connectionID = $func($host, $user, $pass, $force_new) or trigger_error("Database connection failed, please check your connection settings", defined('IS_INSTALL') && IS_INSTALL ? E_USER_WARNING : E_USER_ERROR); if ($this->connectionID) { if (defined('DBG_SQL_MODE')) { $this->Query('SET sql_mode = \''.DBG_SQL_MODE.'\''); @@ -225,6 +225,11 @@ $this->setDB($db); $this->showError(); } + else { + // simulate error, becase php mysql client doesn't provide such information + $this->errorCode = 2003; + $this->errorMessage = "Can't connect to MySQL server on '$host' (113)"; + } } function ReConnect($host, $user, $pass, $db, $force_new = false)