diff --git a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
index 0eac141..e5dcf1d 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
@@ -2,12 +2,15 @@
 
 namespace Drupal\migrate\Plugin\migrate\source;
 
+use Drupal\Core\Database\ConnectionNotDefinedException;
 use Drupal\Core\Database\Database;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\State\StateInterface;
+use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\Plugin\MigrationInterface;
 use Drupal\migrate\Plugin\migrate\id_map\Sql;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
+use Drupal\migrate\Plugin\RequirementsInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -19,7 +22,7 @@
  * is present, it is used as a database connection information array to define
  * the connection.
  */
-abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPluginInterface {
+abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPluginInterface, RequirementsInterface {
 
   /**
    * The query string.
@@ -81,16 +84,17 @@ public function __toString() {
    */
   public function getDatabase() {
     if (!isset($this->database)) {
-      // See if the database info is in state - if not, fallback to
-      // configuration.
+      // Look first for an explicit state key containing the configuration.
       if (isset($this->configuration['database_state_key'])) {
         $this->database = $this->setUpDatabase($this->state->get($this->configuration['database_state_key']));
       }
-      elseif (($fallback_state_key = $this->state->get('migrate.fallback_state_key'))) {
-        $this->database = $this->setUpDatabase($this->state->get($fallback_state_key));
+      // Next, use explicit configuration in the source plugin.
+      elseif (!($fallback_state_key = $this->state->get('migrate.fallback_state_key'))) {
+        $this->database = $this->setUpDatabase($this->configuration);
       }
+      // Otherwise, fallback to the global state key.
       else {
-        $this->database = $this->setUpDatabase($this->configuration);
+        $this->database = $this->setUpDatabase($this->state->get($fallback_state_key));
       }
     }
     return $this->database;
@@ -110,12 +114,17 @@ public function getDatabase() {
    *
    * @return \Drupal\Core\Database\Connection
    *   The connection to use for this plugin's queries.
+   *
+   * @throws \Drupal\migrate\Exception\RequirementsException
+   *   Thrown if there is no properly-configured database.
    */
   protected function setUpDatabase(array $database_info) {
     if (isset($database_info['key'])) {
       $key = $database_info['key'];
     }
     else {
+      // If there is no explicit database configuration at all, fallback to a
+      // connection named 'migrate'.
       $key = 'migrate';
     }
     if (isset($database_info['target'])) {
@@ -127,7 +136,29 @@ protected function setUpDatabase(array $database_info) {
     if (isset($database_info['database'])) {
       Database::addConnectionInfo($key, $target, $database_info['database']);
     }
-    return Database::getConnection($target, $key);
+    try {
+      $connection = Database::getConnection($target, $key);
+    }
+    catch (ConnectionNotDefinedException $e) {
+      // If we fell back to the magic 'migrate' connection and it doesn't exist,
+      // treat the lack of the connection as a RequirementsException.
+      if ($key == 'migrate') {
+        throw new RequirementsException("No database connection configured for source plugin " . $this->pluginId);
+      }
+      else {
+        throw $e;
+      }
+    }
+    return $connection;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function checkRequirements() {
+    if ($this->pluginDefinition['requirements_met'] === TRUE) {
+      $this->getDatabase();
+    }
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
index f732d9f..d6b2800 100644
--- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
+++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php
@@ -77,8 +77,13 @@ public function testGetDefinitions() {
     // All the plugins provided by core depend on migrate_drupal.
     $this->assertEmpty($migration_plugins);
 
-    // Enable migrate_drupal to test that the plugins can now be discovered.
+    // Enable migrate_drupal to test discovery of Drupal migrations.
     $this->enableModules(['migrate_drupal']);
+    $migration_plugins = $this->container->get('plugin.manager.migration')->getDefinitions();
+    // Without a database configured for Drupal migration, no plugins should be
+    // discovered..
+    $this->assertEmpty($migration_plugins);
+
     // Set up a migrate database connection so that plugin discovery works.
     // Clone the current connection and replace the current prefix.
     $connection_info = Database::getConnectionInfo('migrate');
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
index 3af971c..3c3624d 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
@@ -10,7 +10,6 @@
 use Drupal\migrate\Plugin\MigrationInterface;
 use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\Plugin\migrate\source\SqlBase;
-use Drupal\migrate\Plugin\RequirementsInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -19,7 +18,7 @@
  * Mainly to let children retrieve information from the origin system in an
  * easier way.
  */
-abstract class DrupalSqlBase extends SqlBase implements ContainerFactoryPluginInterface, RequirementsInterface, DependentPluginInterface {
+abstract class DrupalSqlBase extends SqlBase implements ContainerFactoryPluginInterface, DependentPluginInterface {
 
   use DependencyTrait;
 
@@ -106,6 +105,7 @@ public function checkRequirements() {
         }
       }
     }
+    parent::checkRequirements();
   }
 
   /**
diff --git a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php
index 3fba70a..9b2c3cd 100644
--- a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php
+++ b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php
@@ -90,6 +90,16 @@ public function getDerivativeDefinitions($base_plugin_definition) {
       return $this->derivatives;
     }
 
+    $node_types = static::getSourcePlugin('d6_node_type');
+    try {
+      $node_types->checkRequirements();
+    }
+    catch (RequirementsException $e) {
+      // If the d6_node_type requirements failed, that means we do not have a
+      // Drupal source database configured - there is nothing to generate.
+      return $this->derivatives;
+    }
+
     // Read all CCK field instance definitions in the source database.
     $fields = array();
     try {
@@ -107,7 +117,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
     }
 
     try {
-      foreach (static::getSourcePlugin('d6_node_type') as $row) {
+      foreach ($node_types as $row) {
         $node_type = $row->getSourceProperty('type');
         $values = $base_plugin_definition;
 
diff --git a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php
index bd3d8b9..3fc2682 100644
--- a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php
+++ b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php
@@ -65,6 +65,16 @@ public static function create(ContainerInterface $container, $base_plugin_id) {
    * {@inheritdoc}
    */
   public function getDerivativeDefinitions($base_plugin_definition) {
+    $node_types = static::getSourcePlugin('d7_node_type');
+    try {
+      $node_types->checkRequirements();
+    }
+    catch (RequirementsException $e) {
+      // If the d7_node_type requirements failed, that means we do not have a
+      // Drupal source database configured - there is nothing to generate.
+      return $this->derivatives;
+    }
+
     $fields = [];
     try {
       $source_plugin = static::getSourcePlugin('d7_field_instance');
@@ -84,7 +94,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
     }
 
     try {
-      foreach (static::getSourcePlugin('d7_node_type') as $row) {
+      foreach ($node_types as $row) {
         $node_type = $row->getSourceProperty('type');
         $values = $base_plugin_definition;
 
