Page MenuHomePhabricator

New installation fails to create/setup database
Closed, ResolvedPublic

Description

Hi everyone.

I am trying to get a new instance of phabricator running; I have checked out the stable branch:

# for i in *; do pushd $i > /dev/null; git show --oneline; popd > /dev/null; done
789aff8 (stable) Promote 2016 Week 17
1ea8d2a (stable) Promote 2016 Week 17
ee92a3f (stable) Promote 2016 Week 17

The webserver is running and the front-page shows the message "Run the storage upgrade script to setup Phabricator's database schema." as I expected.

My mysql ist empty:

# echo 'show databases;' | mysql
Database
information_schema
mysql
performance_schema
#

When I use the storage-script (after stopping the webserver):

# bin/storage status
Database Not Initialized: Run **./bin/storage upgrade** to initialize.
# bin/storage upgrade
Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).

    Are you ready to continue? [y/N] y

Loading quickstart template...
[2016-04-26 07:22:53] EXCEPTION: (AphrontQueryException) #1050: Table '`phabricator_countdown`.`countdown`' already exists at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:353]
arcanist(head=master, ref.master=789aff85dbf9), phabricator(head=master, ref.master=ee92a3f25a41), phutil(head=master, ref.master=1ea8d2ad6daa)
  #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:287]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:185]
  #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:260]
  #4 PhabricatorStorageManagementAPI::applyPatchSQL(string) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:819]
  #5 PhabricatorStorageManagementWorkflow::doUpgradeSchemata(NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:765]
  #6 PhabricatorStorageManagementWorkflow::upgradeSchemata(NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:76]
  #7 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:64]
  #8 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:410]
  #9 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:303]
  #10 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:211]

Is there an error in my installation?

Regards,
Philipp

Event Timeline

toelke renamed this task from New installation fails to create database to New installation fails to create/setup database.Apr 26 2016, 7:26 AM
toelke created this task.

Ok, sorry for the noise, a complete re-install of mysql fixed the issue; I assume that I had not removed all traces of a previous installation as thoroughly as I hoped.

epriestley claimed this task.