php - 无法与任何数据库主机建立连接

标签 php mysql database phabricator

我一直在尝试在 Centos 6.8 和 Ubuntu 14.04 上安装 Phabricator。在这两次尝试中,当使用 phab 配置 MySQL 时,我都收到以下错误:

    EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:140]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, ref.master=4dadad53ae5d), phutil(head=master, ref.master=086df1ba443c)
    #0 PhabricatorLiskDAO::raiseUnreachable(string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:111]
    #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:66]
    #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1008]
    #3 LiskDAO::establishConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:516]
    #4 LiskDAO::loadRawDataWhere(string, string)
    #5 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
    #6 LiskDAO::loadAllWhere(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
    #7 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
    #8 PhabricatorConfigDatabaseSource::__construct(string) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:249]
    #9 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:95]
    #10 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75]
    #11 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:22]
    #12 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-setup.php:12]
    #13 require_once(string) called at [<phabricator>/scripts/sql/manage_storage.php:5]

我一直在遵循这个安装指南:https://secure.phabricator.com/book/phabricator/article/configuration_guide/

我也曾尝试在网上关注其他人,但没有成功。 尝试的命令是

./bin/storage upgrade

我也试过

./bin/storage upgrade --user --password

和其他命令,例如在./bin/config 上设置主机或用户,但似乎都会导致相同的错误。

我不确定此时该做什么,我一直在尝试我能找到的每一个配置。

最佳答案

我今天在运行“bin/config set mysql.host localhost”时遇到了同样的异常。我怀疑最新的 phabricator 代码(截至 2016 年 11 月 23 日)可能存在错误,因此我切换到较早的快照并且一切正常。

关于php - 无法与任何数据库主机建立连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40759269/

相关文章:

php - 使用 PHP 在 mysql 数据库中搜索重复的 user_id

django - 如何使用来自 Postgres 的数据正确填充 Docker Django 图像?

database - 如何在数据库中对数据和逻辑进行建模?

基于下拉选择发送电子邮件和重定向的 PHP 表单

php - 如何管理团队在其他表的字段 id_team 中更新 ID、用户名

php - 无法在 MySQL PHP 表单中显示记录字段更新结果

mysql - Zaiper 是否可以将应用程序连接到本地 mysql 数据库

python - MySQL 查询按日期计算表中的条目数并按日/周/月分组

php - 将与数据库表值混合的表单值插入数据库

php - 是否可以在 Doctrine 和 Symfony2 中找到使用多个值的列?