I'm using drush 9 on a remote server and I'm trying to perform a sql:sync.

This is my alias:

  host: www.mysite.com
    drush-script: '/home/wodby/drush-wrapper.sh'
    files: files
  root: /var/www/html/web
    options: '-p 9191 -o "AddressFamily inet" -o "StrictHostKeyChecking=no"'
  uri: www.mysite.com
  user: wodby

The "drush-wrapper" is a script (on remote server I've docker, so I use ssh to connect into the container. The wrapper is this:

export PATH=$PATH:/usr/local/bin
/home/wodby/.composer/vendor/drush/drush/drush.php $@

This alias works (for commands like drush cr or cim) but doesn't work the sql:sync command.

If I try to run drush sql:sync @d8.live @self I obtain:

 Error: no database record could be found for source @d8.live

How should I add this configuration about database?

1 Answer 1


I just had a similar issue and found out I needed to edit the database login-information on my remote site as it had the local site's info in it since that's where the files came from.

Maybe that's the case on your site too?

In short: Check that the remote site's settings.php-file has the database information from the remote site and not the local site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.