Drush Error: no database record could be found after failed attempt of sql-sync I was pushing our latest version of the site from our development environment to our live site (located on the same server). But unfortunately our web server ran into memory issues which prevented the move. We opened up access to more space but now SQL-sync refuse to function.

I assumed that we had issues with the database being corrupt so I replaced the database with our backup. But this did not help.

The development environment seem to work really well but I am very poor with Drush/SQL so I got a hard time understanding the error messages I get when testing the alias and site config. The Dev site work well while the live site is down and I would appreciate any advice on likely sources of the error.

The Dev alias that work well

sigvard@server1:~$ drush @mysite.dev status
 Drupal version                :  7.26
 Site URI                      :  dev.mysite.org
 Database driver               :  mysql
 Database hostname             :  localhost
 Database username             :  mysite_dev
 Database name                 :  website_mysite_dev
 Database                      :  Connected
 Drupal bootstrap              :  Successful
 Drupal user                   :  Anonymous
 Default theme                 :  mysite
 Administration theme          :  seven
 PHP configuration             :  /etc/php5/cli/php.ini
 Drush version                 :  4.5
 Drush configuration           :
 Drush alias files             :  /usr/share/drush/includes/../aliases/mysite.
                                  aliases.drushrc.php
                                  /home/sigvard/.drush/aliases.drushrc.php
 Drupal root                   :  /var/www/mysite_dev
 Site path                     :  sites/default
 File directory path           :  sites/default/files
 Private file directory path   :


Alias of the live site

sigvard@server1:~$ drush @mysite.live status
include_once(/var/www/mysite/sites/default/settings.php): failed to [warning]
open stream: Permission denied in drupal_settings_initialize() (line
717 of /var/www/mysite/includes/bootstrap.inc).
include_once(): Failed opening                                       [warning]
'/var/www/mysite/sites/default/settings.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
drupal_settings_initialize() (line 717 of
/var/www/mysite/includes/bootstrap.inc).
 Drupal version         :  7.26
 Site URI               :  mysite.org
 Default theme          :  garland
 Administration theme   :  garland
 PHP configuration      :  /etc/php5/cli/php.ini
 Drush version          :  4.5
 Drush configuration    :
 Drush alias files      :  /usr/share/drush/includes/../aliases/mysite.aliases
                           .drushrc.php /home/sigvard/.drush/aliases.drushrc.php
 Drupal root            :  /var/www/mysite
 Site path              :  sites/default
 File directory path    :  sites/default/files


sql-conf of the dev site

sigvard@server1:~$ drush @mysite.dev sql-conf
Array
(
    [database] =&gt; website_mysite_dev
    [username] =&gt; mysite_dev
    [host] =&gt; localhost
    [port] =&gt;
    [driver] =&gt; mysql
    [prefix] =&gt;
)


sql-conf attempt on the live site

sigvard@server1:~$ drush @mysite.live sql-conf
include_once(/var/www/mysite/sites/default/settings.php): failed to [warning]
open stream: Permission denied in drupal_settings_initialize() (line
717 of /var/www/mysite/includes/bootstrap.inc).
include_once(): Failed opening                                       [warning]
'/var/www/mysite/sites/default/settings.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
drupal_settings_initialize() (line 717 of
/var/www/mysite/includes/bootstrap.inc).
I wonder if it's a file system permission on your live site. Are you sure /var/www/mysite/sites/default/settings.php on the live site is readable by your web server?

(Also, unrelated to this but Drush 4.5 is getting pretty old so if possible you might want to update it.)