I am trying to execute drush command from my project root directory and i am getting following error

bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line. See drush topic docs-aliases for details. * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell.

  • is it a working drupal installation? i.e. it is connected to a database and the database is running. Dec 25, 2013 at 8:26
  • yes sir other things are working fine
    – Harshil
    Dec 25, 2013 at 8:59
  • the problem may be due to php path conflict try this out in terminal. $ export DRUSH_PHP='[path_to_your_php]'
    – shrish
    Mar 26, 2014 at 13:24

2 Answers 2


This message occurs with a working site if the site settings.php file is not in the sites/default directory but a sites/example.com directory. In that case to specify the uri of the site you wish to address you use the syntax

drush --uri=example.com [command]

  • Would you please elaborate your comment , i have not set up multisite setup in my project. and my setting.php is in default folder only
    – Harshil
    Dec 26, 2013 at 6:05
  • If your settings are in sites/default/settings.php then this is not your solution. Are you executing drush from within the drupal root? What does 'drush status' provide? Dec 26, 2013 at 18:05

Could you provide the output what you get when you run the following command from your drupal root directory

drush status --uri="application-uri" --debug

You should be seeing something like below in the output

 Drupal version                  :  7.22
Site URI : www.xyz.com Database driver : mysql
Database hostname : localhost Database username : DB-UserName
Database name : DB-Name
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : seven Administration theme : seven
PHP configuration : /etc/php5/cli/php.ini
Drush version : 5.10.0
Drush configuration : /etc/drush/drushrc.php
Drupal root : /var/www/
Site path : sites/default
File directory path : sites/default/files/ Private file directory path : /mnt/tmp/files-private/ Temporary file directory path : /mnt/tmp/

Check whether you could see the below.

Database                        :  Connected                         
Drupal bootstrap                :  Successful

If you see them both then you Drupal is able to connect to the Database, If not then they are not able to connect

You need to check the settings.php in that case.

Also let me know whether you Drupal Front end loads with out any issue

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.