【问题标题】:openshift drush change user passwordopenshift drush 更改用户密码
【发布时间】:2015-04-08 06:36:16
【问题描述】:

我需要通过 drush 命令通过 opehsift rhc 服务器更改 drupal 中 admin 的用户密码,所以我使用了:

drush user-password admin --password="newpasswordhere"

我得到了错误:

[drush2-drupal4ss.rhcloud.com openpublic]\> drush user-password admin --passwor
d="newpasswordhere"
Command user-password 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 'user-password admin' 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.34
 Site URI              :  drush2-drupal4ss.rhcloud.com
 Default theme         :  garland
 Administration        :  garland
 theme
 PHP executable        :  /usr/bin/php
 PHP configuration     :  /var/lib/openshift/54d7161ffcf933c4b30000
                          60/php/configuration/etc/php.ini
 PHP OS                :  Linux
 Drush version         :  6.2.0
 Drush configuration   :  /var/lib/openshift/54d7161ffcf933c4b30000
                          60/.drush/drushrc.php
 Drush alias files     :
 Drupal root           :  /var/lib/openshift/54d7161ffcf933c4b30000
                          60/app-root/runtime/repo/php
 Site path             :  sites/default
 File directory path   :  sites/default/files

那么问题是什么,谁必须让 configure drush 才能访问我的 mysql 数据库? 非常感谢

【问题讨论】:

    标签: openshift drush


    【解决方案1】:

    drush 命令的输出不显示数据库连接设置。我想 settings.php 文件不在文件夹sites/default/ 中。您应该添加 drush 参数 -l your.website.url 并提供您网站的基本 url,以便 drush 可以找到您的 settings.php 的位置。

    尝试使用站点别名,它们定义了根文件夹以及您的 drupal 安装程序的基本 URL。运行drush topic docs-aliases了解更多详情。

    【讨论】:

      猜你喜欢
      • 2011-06-26
      • 1970-01-01
      • 2019-01-14
      • 2016-10-02
      • 2012-05-03
      • 2017-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多