diff --git a/includes/environment.inc b/includes/environment.inc
index 0176ade..096b97c 100644
--- a/includes/environment.inc
+++ b/includes/environment.inc
@@ -1231,8 +1231,18 @@ function drush_valid_db_credentials() {
       }
       // Check the database specific driver is available.
       if (!in_array($type, PDO::getAvailableDrivers())) {
-        drush_log(dt('!type extension for PHP PDO is not installed. Check your php.ini to see how you can enable it.', array('!type' => $type)), 'bootstrap');
-        return FALSE;
+        // Let's try to fetch the databaseType in this case.
+        if (file_exists("./includes/database/$type/database.inc")) {
+          include_once "./includes/database/database.inc";
+          include_once "./includes/database/$type/database.inc";
+          if (method_exists("DatabaseConnection_$type", 'databaseType')) {
+            $type = call_user_func(array("DatabaseConnection_$type", 'databaseType'));
+          }
+        }  
+        if (!in_array($type, PDO::getAvailableDrivers())) {
+          drush_log(dt('!type extension for PHP PDO is not installed. Check your php.ini to see how you can enable it.', array('!type' => $type)), 'bootstrap');
+          return FALSE;
+        }
       }
       // Build the connection string.
       if ($type === 'sqlite') {
