I just started to use Drush and I think I have some miss-configuration somewhere. I use MAMP (on mac) and s/Applications/MAMP/htdocs/subastas is the folder for the Drupal installation.
The error tells me the site has not a configured database, but that is not true since the site is running just fine.
When I try to run the pml command I get this error message:
Dooghouse-iMac:subastas doghouse$ drush pml
PDO::__construct()
: [2002] No such file or directory (trying to [warning]
connect via unix:///var/mysql/mysql.sock) environment.inc:517
Command pm-list needs a higher bootstrap level to run - you will need [error]
invoke drush from a more functional Drupal environment to run this
command.
The drush command 'lml' 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.9
Site URI :http://default
Database driver : mysql
Database hostname : localhost
Database username : drupal
Database name : subastas
Default theme : garland
Administration theme: garland
PHP configuration :
Drush version : 5.2
Drush configuration:
Drupal root : /Applications/MAMP/htdocs/subastas
Site path : sites/default
Modules path : sites/all/modules
Themes path : sites/all/themes
File directory path: sites/default/files
%paths : ArrayYou 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.
This is the error message shown when using drush si
:
My-Name-iMac:drupal-7.14 myname$ drush si --db-url=mysql://root:drupal@localhost:8889/d14
You are about to CREATE the 'd14' database. Do you want to continue? (y/n): y
sh: mysql: command not found
Starting Drupal installation. This takes a few seconds … [ok]
WD php: Warning:PDO::__construct()
: [2002] No such file or directory [warning]
(trying to connect via unix:///var/mysql/mysql.sock) inDatabaseConnection->__construct()
(line 304 of /Applications/MAMP/htdocs/drupal-7.14/includes/database/database.inc).
WD php: Exception: In order for Drupal to work, and to continue with [error]
the installation process, you must resolve all issues reported below.
For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory. Is the database server running? Does the database exist, and have you entered the correct database name?Have you entered the correct username and password? Have you entered the correct database hostname? in install_run_task() (line 417 of /Applications/MAMP/htdocs/drupal-7.14/includes/install.core.inc). WD php: Warning: Cannot modify header information - headers already [warning] sent by (output started at /Users/myname/Documents/drush/drush/includes/output.inc:37) in drupal_send_headers() (line 1239 of /Applications/MAMP/htdocs/drupal-7.14/includes/bootstrap.inc). Exception:In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory.in install_run_task() (line 417 of /Applications/MAMP/htdocs/drupal-7.14/includes/install.core.inc).
- Is the database server running?
- Does the database exist, and have you entered the correct database name?
- Have you entered the correct username and password?
- Have you entered the correct database hostname?
Drush command terminated abnormally due to an unrecoverable error. [error]