I'm having trouble connecting to my databases. It worked a few days ago but can't seem to figure why it doesn't work now. It's a D8-site. Drush version is 8.1.12.
I've double-checked both the alias-file and settings.php-files (both on server & local) and database settings all appear correct. My local site runs on Mamp 4.1.1. and network access is allowed.
Here's the error I get when running sql-sync drush sql-sync @local @dev
. Rsync works fine.
Unable to load class Drush\Sql\Sql [error]
exception 'Drush\Sql\SqlException' with message 'Unable to find a matching SQL Class. Drush cannot find your database connection details.' in /vendor/drush/drush/commands/sql/sql.drush.inc:541 [error]
Stack trace:
#0 /vendor/drush/drush/commands/sql/sql.drush.inc(252): drush_sql_get_class()
#1 [internal function]: drush_sql_dump()
#2 /vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_sql_dump', Array)
#3 /vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#4 [internal function]: drush_command()
#5 /vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#6 /vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#7 /vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#8 /vendor/drush/drush/drush.php(12): drush_main()
#9 {main}
sql-dump failed.
And here's the aliases.drushrc.php (my local copy of course includes credentials:))
<?php
/* Tambourhinoceros Site */
$aliases["local"] = array (
'root' => '', // local path
'uri' => 'local.tambourhinoceros.net', // local uri
'path-aliases' =>
array (
'%dump-dir' => '/tmp',
'%drush' => '/usr/local/bin',
'%site' => 'sites/default',
),
'remote-user' => 'tamb_dev',
'ssh-options' => '-T',
'databases' =>
array (
'default' =>
array (
'default' =>
array (
'database' => '', // local database
'username' => '', // local database user
'password' => '', // local database pw
'host' => 'localhost',
'port' => '8889',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
'prefix' => '',
),
),
),
);
$aliases["dev"] = array (
'root' => '', // remote path
'uri' => 'drupal-85630-297475.cloudwaysapps.com', // remote uri
'path-aliases' =>
array (
),
'remote-host' => '', remote IP
'remote-user' => '', remote User
'command-specific' =>
array (
'rsync' =>
array (
'mode' => 'rlptzO',
'verbose' => true,
'no-perms' => true,
),
),
'databases' =>
array (
'default' =>
array (
'default' =>
array (
'database' => '', remote database
'username' => '', remote user
'password' => '', remote pw
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
),
)
?>