Drupal 7 开发内部培训资料, 分头诗人

drush 只能用drush dl 、cc all 二条命令,其它的都报同一个错误

赞成!
0
否决!

[root@AY1403072133429290dbZ www.penghuajun.com]# drush en views -y
Command pm-enable needs a higher bootstrap level to run - you    [error]
will need to invoke drush from a more functional Drupal
environment to run this command.
The drush command 'en views' could not be executed.              [error]
Drush was not able to start (bootstrap) the Drupal database.     [error]
Hint: This may occur when Drush is trying to:
* 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.
See http://drupal.org/node/1428638 for details.

Drush was attempting to connect to:
Drupal version         :  7.32                                
Site URI               :  http://default                      
Database driver        :  mysql                               
Database username      :  root                                
Database name          :  drupal7                             
Default theme          :  garland                             
Administration theme   :  garland                             
PHP executable         :  /usr/bin/php                        
PHP configuration      :  /etc/php.ini                        
PHP OS                 :  Linux                               
Drush version          :  6.2.0                               
Drush configuration    :                                      
Drush alias files      :  /usr/share/pear/drush/includes/../al
                           iases.drushrc.php                   
Drupal root            :  /data/wwwroot/www.penghuajun.com    
Site path              :  sites/default                       
File directory path    :  sites/default/files

2 个回答

赞成!
0
否决!

试一下修改settings.php,找到$db_url,把 'localhost' 改为 '127.0.0.1'  

赞成!
0
否决!

一样的,没有效果。