Hi.

This is what happens with up/en/cron with drush at the top of any drupal install I have on the computer:

drush dis module_builder
Command pm-disable needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command.                 [error]
The drush command 'dis module_builder' could not be executed.                                                                                                        [error]
Drush was not able to start (bootstrap) the Drupal database.                                                                                                         [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.

Drush was attempting to connect to : 
  Drupal version    : 7.14
  Site URI          : http://default
  Database driver   : mysql
  Database hostname : localhost
  Database username : root
  Database name     : multisite_sandbox
  Default theme     : garland
  Administration theme: garland
  PHP configuration : 
  Drush version     : 5.3
  Drush configuration: 
  Drupal root       : /Applications/MAMP/htdocs/dev/sandbox/7
  Site path         : sites/default
  Modules path      : sites/all/modules
  Themes path       : sites/all/themes
  File directory path: sites/default/files
  %paths            : Array

You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or $options['uri'] in your
drushrc.php file.

I have created a symbolic link and added path to .bash_profile but it doesn't work in any of my drupal databases. Themes aren't even garland and I don't remember changing any setting on the OS.

Should you require, I'll be happy to assist you.

Comments

jonhattan’s picture

Status: Active » Postponed (maintainer needs more info)

Try setting database hostname to 127.0.0.1 instead of localhost in settings.php

Yorgg’s picture

Hi Jonhattan,

I did the change but the problem remains the same.
I am using MAMP.

jonhattan’s picture

did you follow the "ADDITIONAL CONFIGURATIONS FOR MAMP" section in README.txt ?

Yorgg’s picture

I had drush working for months with my previous configuration so I didn't read any further.
Something must have changed. I only had to copy php.ini to /etc/drush

Many thanks,
Jorge

greg.1.anderson’s picture

Version: 7.x-5.3 » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to closed (duplicate).

Use our Github project for contributing code, or reporting bugs, or requesting features.

greg.1.anderson’s picture

Issue summary: View changes

Added mention to the path (root) of the drupal installations.