I tried running drush sql-sync @dev sql-conf --verbose
with drush 8.1.18 and php 7.3.14 and I get this error:
Begin redispatch via drush_invoke_process(). [notice]
Calling proc_open(env COLUMNS=237 /var/www/app/html/vendor/drush/drush/drush.launcher --root=/var/www/app/html --verbose sql-sync '@dev' sql-conf 2>&1);
Loaded alias @dev from file /home/mike/.drush/aliases.drushrc.php [notice]
/usr/bin/php /home/mike/.composer/vendor/drush/drush/drush.php --php=/usr/bin/php --backend=2 --verbose --uri= --root=/var/www/app/html sql-conf --all 2>&1 [notice]
The command could not be executed successfully (returned: Begin redispatch via drush_invoke_process(). [error]
[notice]
Calling proc_open(env COLUMNS=237 /var/www/app/html/vendor/drush/drush/drush.launcher --root=/var/www/app/html --verbose --uri= sql-conf --all 2>&1);
Loading outputformat engine.
[notice]
Array
(
[default] => Array
(
[default] => Array
(
[database] => mydb
[username] => root
[host] => localhost
[port] =>
[driver] => mysql
[prefix] =>
[charset] => utf8mb4
[collation] => utf8mb4_general_ci
)
)
)
Command dispatch complete
[notice]
End redispatch via drush_invoke_process().
[notice]
, code: 0)
Error: no database record could be found for source @dev [error]
Command dispatch complete [notice]
End redispatch via drush_invoke_process().
I checked my database credentials. I can login to the local db without a problem.
How can I debug this further?
I tried putting echo statements in ~/.config/composer/vendor/drush/drush/commands/sql/sqlsync.drush.inc
but it is not using that file at all.
Here is how I defined my dev alias:
<?php
$aliases['em.dev'] = array(
'uri' => '',
'root' => '/var/www/myapp/html',
'path-aliases' => array(
'%drush-script' => '/home/mike/.composer/vendor/drush/drush/drush.php',
'%dump-dir' => '/tmp',
),
);