diff --git a/sites/all/modules/schema/engines/mysql.inc b/sites/all/modules/schema/engines/mysql.inc
index f86aaa3..6a9c671 100644
--- a/sites/all/modules/schema/engines/mysql.inc
+++ b/sites/all/modules/schema/engines/mysql.inc
@@ -29,15 +29,32 @@
   }
 
   public function inspect($connection = 'default', $name = NULL) {
+    global $db_prefix;
     // Get the current database name
     $info = Database::getConnectionInfo($connection);
-    $database = $info['default']['database'];
+    //connectionInfo always set ['prefix']['default'], @see Database::getConnectionInfo()
+    $db_prefix = empty($info['default']['prefix']['default']) ? '' : $info['default']['prefix'];
+    $databases = array(
+      $info['default']['database'] => $info['default']['database'], //default db
+    );
+
+    if (is_array($db_prefix)){
+      foreach ($db_prefix as $prefix){
+        if ($prefix[strlen($prefix) - 1] == '.') {
+          //it is reference to schema/database
+          $prefix = drupal_substr($prefix, 0, -1);
+          if (!isset($databases[$prefix])){
+            $databases[$prefix] = $prefix;
+          }
+        }
+      }
+    }
 
     $tables = array();
-    $args = array(':database' => $database);
+    $args = array(':databases' => $databases);
     $sql = 'SELECT table_name, table_comment
             FROM information_schema.tables
-            WHERE table_schema=:database ';
+            WHERE table_schema IN (:databases) ';
     if (isset($name)) {
       $sql .= 'AND table_name = :table ';
       $args[':table'] = $name;
@@ -50,7 +67,7 @@
     $sql = 'SELECT table_name, column_type, column_name, column_default,
                    extra, is_nullable, numeric_scale, column_comment
             FROM information_schema.columns
-            WHERE table_schema=:database ';
+            WHERE table_schema IN (:databases) ';
     if (isset($name)) {
       $sql .= 'AND table_name = :table ';
     }
@@ -101,7 +118,7 @@
 
     $sql = 'SELECT table_name, column_name, index_name, sub_part, non_unique
             FROM information_schema.statistics
-            WHERE table_schema=:database ';
+            WHERE table_schema IN (:databases) ';
     if (isset($name)) {
       $sql .= 'AND table_name = :table ';
     }
