I installed drush using composer following the instructions here: http://docs.drush.org/en/master/install/

When trying to run drush cc all I get this error:

No Drupal site found, only 'drush' cache was cleared.[warning] 'all' cache was cleared. [success]

I added this line:

export PATH="/Applications/MAMP/bin/php/php5.6.2/bin:$PATH"

to my .bash_profile and restarted bash and MAMP. Still no luck. Any ideas?

This is my drush status:

 Drupal version         :  7.36                                                             
 Site URI               :  http://default                                                   
 Database driver        :  mysql                                                            
 Database hostname      :  localhost                                                        
 Database port          :                                                                   
 Database username      :  root                                                             
 Database name          :  srod                                                   
 PHP executable         :  /usr/bin/php                                                     
 PHP configuration      :                                                                   
 PHP OS                 :  Darwin                                                           
 Drush script           :  /Users/srod/.composer/vendor/drush/drush/drush.php 
 Drush version          :  7.0-dev                                                          
 Drush temp directory   :  /tmp                                                             
 Drush configuration    :                                                                   
 Drush alias files      :                                                                   
 Drupal root            :  /Applications/MAMP/htdocs/srodsite                           
 Site path              :  sites/default   

I'm running it from Drupal project folder.

  • You run it from inside your drupal project folder, right?
    – leymannx
    Commented May 6, 2015 at 17:31
  • Yes, running it from drupal project folder.
    – srodrig
    Commented May 6, 2015 at 17:34
  • Please post the output of drush status, if all is correctly set up it should be giving you the appropriate database name. This is usually the case when incorrect values in settings.php
    – pal4life
    Commented May 6, 2015 at 17:55
  • Added my drush status in my original post
    – srodrig
    Commented May 6, 2015 at 18:38
  • I can't seem to update the PHP executable... does this have something to do with the issue?
    – srodrig
    Commented May 6, 2015 at 21:07

4 Answers 4


I figured out that you will need a mysql server installed and included in path, even if you are using mysql from AWS RDS.

  • This seems sadly correct but it shouldn't be that way
    – frazras
    Commented Apr 15, 2016 at 3:37
  • Thanks for this! I have a Drupal installation where I'm using an RDS instance and didn't bother installing mysql on the server itself. Luckily I found your answer quite quickly and didn't spend too much time running around in circles. The error drush outputs doesn't make any sense.
    – Titi
    Commented Sep 8, 2016 at 22:36

For people working on Windows, you need to verify that your PATH Variable for MYSQL is properly set. I had the problem when I had upgraded my WAMP.

Example like this : C:\wamp\bin\mysql\mysql5.6.17\bin

  • It's worked for me. I realize the error was from sql once I execute command drush sql-cli and it's return error unrecognized mysql command
    – Praditha
    Commented May 15, 2018 at 3:59

Haven't tried it myself, but maybe you want to try what is mentioned here , and which points to https://www.drupal.org/node/1428638 . Here is a quote from it:

Edit the settings.php file of your drupal installation, and go to the database settings entry.

change the host line to:

'host' => php_sapi_name() == 'cli' ? '' : 'localhost',

Curious to hear if that could help ...


If you're running inside Drupal root folder, there are two possibilities which may go wrong:

  1. drush cannot find Drupal core files (you don't have index.php or common.inc), check by:

    find -maxdepth 2 -name index.php -o -name common.inc
  2. Your PHP CLI doesn't have PDO extension (php -m | grep pdo).


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