Installation - Database Setup problem


#1

Hello,

I have a problem installing Piwik (2.11.1) on Windows 7, NGINX with PHP 5.6.6 (php-5.6.6-nts-Win32-VC11-x86), MySql 5.1.
When I use “out of the box” Piwik, and going through installation process, first two steps are passed (system check is all green). I fill data on Database Setup page, click Next, browser gets some response and the same page is reloaded. I see Database Setup page again with default data in it. No error or warning.

While trying to figure out what happens, I created config.ini.php file with DB info but installation process did not start at all. It shod me an error that table is missing.
So, I changed global.ini.php to have log file with level DEBUG and started installation process again.
At this moment System Check showed and error with integrity check but allowed to continue.


File integrity check failed and reported some errors. This is most likely due to a partial or failed upload of some of the Piwik files. You should reupload all the Piwik files in BINARY mode and refresh this page until it shows no error.
Integrity check failed: C:\...\nginx\nginx-1.7.10\html\piwik/config/global.ini.php

After running Database Setup again, I saw in the log an error


DEBUG LanguagesManager[2015-02-25 13:11:05] Db::fetchAll() executing SQL: SELECT option_value, option_name FROM `option` WHERE autoload = 1
DEBUG LanguagesManager[2015-02-25 13:11:07] Db::fetchAll() executing SQL: SELECT option_value, option_name FROM `option` WHERE autoload = 1
DEBUG LanguagesManager[2015-02-25 13:11:09] C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Abstract.php(144): SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)
  #0 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
  #1 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter\Pdo\Mysql.php(51): Zend_Db_Adapter_Pdo_Mysql->_connect()
  #2 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter.php(45): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
  #3 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(104): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
  #4 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(53): Piwik\Db::createDatabaseObject()
  #5 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(701): Piwik\Db::get()
  #6 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(201): Piwik\Db::logExtraInfoIfDeadlock(Object(Zend_Db_Adapter_Exception))
  #7 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Option.php(260): Piwik\Db::fetchAll('SELECT option_v...')
  #8 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Option.php(173): Piwik\Option->autoload()
  #9 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Option.php(46): Piwik\Option->getValue('UpdateCheck_Lat...')
  #10 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\UpdateCheck.php(91): Piwik\Option::get('UpdateCheck_Lat...')
  #11 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\UpdateCheck.php(102): Piwik\UpdateCheck::getLatestVersion()
  #12 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\View.php(225): Piwik\UpdateCheck::isNewestVersionAvailable()
  #13 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\plugins\LanguagesManager\LanguagesManager.php(93): Piwik\View->render()
  #14 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\plugins\LanguagesManager\LanguagesManager.php(68): Piwik\Plugins\LanguagesManager\LanguagesManager->getLanguagesSelector()
  #15 [internal function]: Piwik\Plugins\LanguagesManager\LanguagesManager->addLanguagesManagerToOtherTopBar('<script type='t...')
  #16 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\EventDispatcher.php(121): call_user_func_array(Array, Array)
  #17 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Piwik.php(702): Piwik\EventDispatcher->postEvent('Template.topBar', Array, false, NULL)
  #18 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Twig.php(165): Piwik\Piwik::postEvent('Template.topBar', Array)
  #19 [internal function]: Piwik\Twig->Piwik\{closure}('Template.topBar')
  #20 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\tmp\templates_c\53\fb\9c2dba1e291e0d4c871a3a4dcfaacf303cf5cdf9771ca57ce75bae0c6655.php(74): call_user_func_array(Object(Closure), Array)
  #21 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Template.php(289): __TwigTemplate_53fb9c2dba1e291e0d4c871a3a4dcfaacf303cf5cdf9771ca57ce75bae0c6655->doDisplay(Array, Array)
  #22 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Template.php(263): Twig_Template->displayWithErrorHandling(Array, Array)
  #23 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\tmp\templates_c\ce\7e\2a92023135e81093010ff7d84a633702de959b14db28e19ae14d8688eac4.php(32): Twig_Template->display(Array, Array)
  #24 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Template.php(289): __TwigTemplate_ce7e2a92023135e81093010ff7d84a633702de959b14db28e19ae14d8688eac4->doDisplay(Array, Array)
  #25 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Template.php(263): Twig_Template->displayWithErrorHandling(Array, Array)
  #26 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Template.php(274): Twig_Template->display(Array)
  #27 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\vendor\twig\twig\lib\Twig\Environment.php(293): Twig_Template->render(Array)
  #28 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\View.php(252): Twig_Environment->render('@Installation/d...', Array)
  #29 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\View.php(246): Piwik\View->renderTwigTemplate()
  #30 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\plugins\Installation\View.php(48): Piwik\View->render()
  #31 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\plugins\Installation\Controller.php(164): Piwik\Plugins\Installation\View->render()
  #32 [internal function]: Piwik\Plugins\Installation\Controller->databaseSetup('The configurati...')
  #33 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(604): call_user_func_array(Array, Array)
  #34 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(96): Piwik\FrontController->doDispatch('Installation', 'databaseSetup', Array)
  #35 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\plugins\Installation\Installation.php(97): Piwik\FrontController->dispatch('Installation', 'databaseSetup', Array)
  #36 [internal function]: Piwik\Plugins\Installation\Installation->dispatch(Object(Exception))
  #37 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\EventDispatcher.php(121): call_user_func_array(Array, Array)
  #38 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\EventDispatcher.php(184): Piwik\EventDispatcher->postEvent('Config.NoConfig...', Array, false, Array)
  #39 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Plugin\Manager.php(829): Piwik\EventDispatcher->postPendingEventsTo(Object(Piwik\Plugins\Installation\Installation))
  #40 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Plugin\Manager.php(668): Piwik\Plugin\Manager->reloadActivatedPlugins()
  #41 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Plugin\Manager.php(101): Piwik\Plugin\Manager->loadPlugins(Array)
  #42 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(333): Piwik\Plugin\Manager->loadActivatedPlugins()
  #43 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\dispatch.php(30): Piwik\FrontController->init()
  #44 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\index.php(27): require_once('C:\\piwik\\...')
  #45 {main}
DEBUG Piwik\FrontController[2015-02-25 13:11:10] C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Abstract.php(144): SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)
  #0 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
  #1 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter\Pdo\Mysql.php(51): Zend_Db_Adapter_Pdo_Mysql->_connect()
  #2 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter.php(45): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
  #3 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(104): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
  #4 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(53): Piwik\Db::createDatabaseObject()
  #5 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Profiler.php(62): Piwik\Db::get()
  #6 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(228): Piwik\Profiler::displayDbProfileReport()
  #7 [internal function]: Piwik\FrontController->__destruct()
  #8 {main}
DEBUG Piwik\FrontController[2015-02-25 13:11:11] C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Config.php(373): The configuration file {C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik/config/config.ini.php} has not been found or could not be read.
  #0 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Config.php(348): Piwik\Config->checkLocalConfigFound()
  #1 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Config.php(429): Piwik\Config->init()
  #2 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(276): Piwik\Config->__get('database')
  #3 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(313): Piwik\FrontController::createConfigObject()
  #4 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\dispatch.php(30): Piwik\FrontController->init()
  #5 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\index.php(27): require_once('C:\\piwik\\...')
  #6 {main}
DEBUG Piwik\FrontController[2015-02-25 13:11:12] C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Abstract.php(144): SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)
  #0 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\libs\Zend\Db\Adapter\Pdo\Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
  #1 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter\Pdo\Mysql.php(51): Zend_Db_Adapter_Pdo_Mysql->_connect()
  #2 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db\Adapter.php(45): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
  #3 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(104): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
  #4 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Db.php(53): Piwik\Db::createDatabaseObject()
  #5 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\Profiler.php(62): Piwik\Db::get()
  #6 C:\piwik\piwik tests\nginx\nginx-1.7.10\html\piwik\core\FrontController.php(228): Piwik\Profiler::displayDbProfileReport()
  #7 [internal function]: Piwik\FrontController->__destruct()
  #8 {main}

I cannot figure out what’s wrong or is this a bug.

Thanks
Misha


(Matthieu Aubry) #2

Hi there,

This was a bug in Piwik, fixed in git, see: SQLSTATE[42000] [1044] Access denied for user 'xyz'@'localhost' to database 'abc' · Issue #7275 · matomo-org/piwik · GitHub


#3

Thanks,
I did not think that this is the same issue because behavior and logs showed different things.
And, I am not sure this is a problem with piwik because I successfully installed it on Apache 2 with the same PHP.

Misha