Search code examples
phpmysqlphabricator

Issue with Phabricator configuration for MySQL


I am able to get to the URL for phabricator. When I run the following the script from the phabricator directory, I receive the error copied below. I have also copied the mysql config info from the custom/myconfig.conf.php file (the credentials work - I can log on via the terminal using mysql -u root -p). I will change the credentials to non root once I can test the setup.

myconfig.conf.php

  // DatabaseConfigurationProvider.
  'mysql.configuration-provider' => 'DefaultDatabaseConfigurationProvider',

  // The username to use when connecting to MySQL.
  'mysql.user' => 'root',

  // The password to use when connecting to MySQL.
  'mysql.pass' => 'xxxxxxxxx',

  // The MySQL server to connect to.
  'mysql.host' => '127.0.0.1', ///'localhost',

  // If you want to connect to a different port than the default (which is 3306)
  'mysql.port' => null,

Error after running ./bin/storage upgrade

Unable To Connect: Attempt to connect to root@localhost failed with error #1045: Access denied for user 'root'@'localhost' (using password: NO).

MySQL is listening on 127.0.0.1:3306. I have tried the following as well (passing in root ID as well) but it did not work: ./bin/storage upgrade --user --password

Update: When I run the ./bin/storage upgrade command with a new set of credentials, I get the following error:

        [2014-05-07 16:15:16] EXCEPTION: (RuntimeException) Undefined property:

     DefaultDatabaseConfigurationProvider::$getPassword at

     [/usr/local/phabricator/libphutil/src/error/PhutilErrorHandler.php:216]

          #0 PhutilErrorHandler::handleError(8, Undefined property: 

    DefaultDatabaseConfigurationProvider::$getPassword,


     /usr/local/phabricator/phabricator/scripts/sql/manage_storage.php, 75, 

Array of size 16 starting with: { _GET => Array  }) called at 

    [/usr/local/phabricator/phabricator/scripts/sql/manage_storage.php:75]

The storage now works with a new DB credentials if I pass in the username/password in the storage upgrade command but its not picked up correctly from the conf file. I will check the conf and update this accordingly.


Solution

  • The storage now works with a new DB credentials if I pass in the username/password in the storage upgrade command but its not picked up correctly from the conf file. I will check the conf and update this accordingly.

    ./bin/storage upgrade --user "actual username" --password "actual password"