0

I am trying to install magento on my localhost and getting issue file installing set up.

Starting Magento installation: File permissions check...

            Required extensions check...

            Enabling Maintenance Mode...

            Installing deployment configuration...

            Installing database schema:
            [ERROR] PDOException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128
            Stack trace:
            #0 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(128): PDO->__construct('mysql:dbname=in...', '', '', Array)
            #1 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
            #2 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(353): Zend_Db_Adapter_Pdo_Mysql->_connect()
            #3 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
            #4 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT version(...', Array)
            #5 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('SELECT version(...', Array)
            #6 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT version(...', Array)
            #7 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Magento\Framework\DB\Adapter\Pdo\Mysql->query('SELECT version(...', Array)
            #8 /var/www/html/m2111/setup/src/Magento/Setup/Validator/DbValidator.php(93): Zend_Db_Adapter_Abstract->fetchOne('SELECT version(...')
            #9 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(1193): Magento\Setup\Validator\DbValidator->checkDatabaseConnection('', '', '', '')
            #10 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(774): Magento\Setup\Model\Installer->assertDbAccessible()
            #11 [internal function]: Magento\Setup\Model\Installer->installSchema()
            #12 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(344): call_user_func_array(Array, Array)
            #13 /var/www/html/m2111/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
            #14 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
            #15 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
            #16 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
            #17 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #18 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #19 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
            #20 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
            #21 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
            #22 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #23 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #24 /var/www/html/m2111/setup/index.php(31): Zend\Mvc\Application->run()
            #25 {main}

              Next Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144
            Stack trace:
            #0 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
            #1 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(353): Zend_Db_Adapter_Pdo_Mysql->_connect()
            #2 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
            #3 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT version(...', Array)
            #4 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('SELECT version(...', Array)
            #5 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT version(...', Array)
            #6 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Magento\Framework\DB\Adapter\Pdo\Mysql->query('SELECT version(...', Array)
            #7 /var/www/html/m2111/setup/src/Magento/Setup/Validator/DbValidator.php(93): Zend_Db_Adapter_Abstract->fetchOne('SELECT version(...')
            #8 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(1193): Magento\Setup\Validator\DbValidator->checkDatabaseConnection('', '', '', '')
            #9 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(774): Magento\Setup\Model\Installer->assertDbAccessible()
            #10 [internal function]: Magento\Setup\Model\Installer->installSchema()
            #11 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(344): call_user_func_array(Array, Array)
            #12 /var/www/html/m2111/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
            #13 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
            #14 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
            #15 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
            #16 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #17 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #18 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
            #19 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
            #20 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
            #21 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #22 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
            #23 /var/www/html/m2111/setup/index.php(31): Zend\Mvc\Application->run()
            #24 {main}

Next Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144
    Stack trace:
 #0 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(353): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
#3 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT version(...', Array)
#4 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('SELECT version(...', Array)
 #5 /var/www/html/m2111/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT version(...', Array)
#6 /var/www/html/m2111/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Magento\Framework\DB\Adapter\Pdo\Mysql->query('SELECT version(...', Array)
 #7 /var/www/html/m2111/setup/src/Magento/Setup/Validator/DbValidator.php(93): Zend_Db_Adapter_Abstract->fetchOne('SELECT version(...')
 #8 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(1193): Magento\Setup\Validator\DbValidator->checkDatabaseConnection('', '', '', '')
 #9 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(774): Magento\Setup\Model\Installer->assertDbAccessible()
 #10 [internal function]: Magento\Setup\Model\Installer->installSchema()
 #11 /var/www/html/m2111/setup/src/Magento/Setup/Model/Installer.php(344): call_user_func_array(Array, Array)
  #12 /var/www/html/m2111/setup/src/Magento/Setup/Controller/Install.php(109): Magento\Setup\Model\Installer->install(Array)
  #13 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
 #14 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
 #15 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#16 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#17 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
 #18 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
  #19 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
  #20 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
   #21 /var/www/html/m2111/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
  #22 /var/www/html/m2111/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#23 /var/www/html/m2111/setup/index.php(31): Zend\Mvc\Application->run()
#24 {main}
3
  • Have you verified that the files have 644 and folders 755?
    – Max
    Feb 22, 2018 at 9:29
  • Yes file permission is 755
    – Aman Deep
    Feb 22, 2018 at 9:30
  • check for any missing file , or db connectivity...
    – Ashna
    Feb 22, 2018 at 9:53

3 Answers 3

0

Looking that error code I think this is just a connection error to MySQL server, or maybe a php version difference between web requests and CLI

More info http://devdocs.magento.com/guides/v2.1/install-gde/trouble/php/tshoot_phpini.html

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured if this is the case.

2
  • I am using Above 7 and an set up already installed
    – Aman Deep
    Feb 22, 2018 at 10:43
  • Above 7, but... same version as CLI? Feb 22, 2018 at 10:45
0

Most likely because it can't connect to the database.

Could you add 'localhost' in Magento setup for database host? Please alo check once more that you've entered correct credentials for username and password.

0

I'd advise changing the host to "127.0.0.1" as well as ensuring that all your ports are open by closing every program that might be using them, e.g. Skype.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.