How to resolve my database connection error when using the Wordpress Migrate module? I have a Drupal8 site and I've installed the Wordpress Migrate module and it's dependencies for migrating a Wordpress site to Drupal8.

When I start to import the exported XML file from Wordpress, I get this error:

The website encountered an unexpected error. Please try again later.


When I checked the error messages pages I found this:


  Drupal\Core\Database\ConnectionNotDefinedException: The specified database connection is not defined: migrate in Drupal\Core\Database\Database::openConnection() (line 361 of /media/mosama/Content/test_poc/drupal8_2/core/lib/Drupal/Core/Database/Database.php).


Any solution for this?
Solved!
By adding anothe data base configuration with ['migrate'] in settings.php under the default database like this

$databases['migrate']['default'] = array (
  'database' =&gt; 'NAME',
  'username' =&gt; 'USER',
  'password' =&gt; 'PASS',
  'prefix' =&gt; '',
  'host' =&gt; 'localhost',
  'port' =&gt; '3306',
  'namespace' =&gt; 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' =&gt; 'mysql',
);