diff --git a/adminer/drivers/mongo.inc.php b/adminer/drivers/mongo.inc.php index ba0a4ac4..b63be606 100644 --- a/adminer/drivers/mongo.inc.php +++ b/adminer/drivers/mongo.inc.php @@ -600,6 +600,11 @@ if (isset($_GET["mongo"])) { global $adminer; $connection = new Min_DB; list($server, $username, $password) = $adminer->credentials(); + + if ($server == "") { + $server = "localhost:27017"; + } + $options = array(); if ($username . $password != "") { $options["username"] = $username; diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index ac0fa4a0..f6990c13 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -303,6 +303,11 @@ if (isset($_GET["mssql"])) { global $adminer; $connection = new Min_DB; $credentials = $adminer->credentials(); + + if ($credentials[0] == "") { + $credentials[0] = "localhost:1433"; + } + if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) { return $connection; }