PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128 Stack trace: #0 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(128): PDO->__construct('mysql:host=loca...', 'admin', 'p3trichor!', Array) #1 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(347): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(861): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #4 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(931): Zend_Db_Adapter_Abstract->quote('default', NULL) #5 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1372): Zend_Db_Adapter_Abstract->quoteInto('{{fieldName}} =...', 'default', NULL, NULL) #6 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(2830): Magento\Framework\DB\Adapter\Pdo\Mysql->quoteInto('{{fieldName}} =...', 'default') #7 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(2814): Magento\Framework\DB\Adapter\Pdo\Mysql->_prepareQuotedSqlCondition('{{fieldName}} =...', 'default', '`scope`') #8 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(477): Magento\Framework\DB\Adapter\Pdo\Mysql->prepareSqlCondition('`scope`', 'default') #9 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(408): Magento\Framework\Data\Collection\AbstractDb->_getConditionSql('`scope`', 'default') #10 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(390): Magento\Framework\Data\Collection\AbstractDb->_translateCondition('scope', 'default') #11 /var/www/html/vendor/magento/module-store/Model/ResourceModel/Config/Collection/Scoped.php(59): Magento\Framework\Data\Collection\AbstractDb->addFieldToFilter('scope', 'default') #12 /var/www/html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php(124): Magento\Store\Model\ResourceModel\Config\Collection\Scoped->_initSelect() #13 /var/www/html/vendor/magento/module-store/Model/ResourceModel/Config/Collection/Scoped.php(48): Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection->__construct(Object(Magento\Framework\Data\Collection\EntityFactory), Object(Magento\Framework\Logger\Monolog), Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query), Object(Magento\Framework\Event\Manager\Proxy), NULL, Object(Magento\Config\Model\ResourceModel\Config\Data)) #14 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Store\Model\ResourceModel\Config\Collection\Scoped->__construct(Object(Magento\Framework\Data\Collection\EntityFactory), Object(Magento\Framework\Logger\Monolog), Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Config\Model\ResourceModel\Config\Data), 'default', NULL, NULL) #15 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Store\\M...', Array) #16 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Store\\M...', Array) #17 /var/www/html/var/generation/Magento/Store/Model/ResourceModel/Config/Collection/ScopedFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Store\\M...', Array) #18 /var/www/html/vendor/magento/module-store/Model/Config/Reader/DefaultReader.php(62): Magento\Store\Model\ResourceModel\Config\Collection\ScopedFactory->create(Array) #19 /var/www/html/vendor/magento/framework/App/Config/ScopePool.php(112): Magento\Store\Model\Config\Reader\DefaultReader->read() #20 /var/www/html/vendor/magento/framework/App/Config.php(45): Magento\Framework\App\Config\ScopePool->getScope('default', NULL) #21 /var/www/html/vendor/magento/framework/App/Config.php(58): Magento\Framework\App\Config->getValue('web/secure/use_...', 'default', NULL) #22 /var/www/html/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag('web/secure/use_...') #23 /var/www/html/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #24 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #25 /var/www/html/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(26): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #26 /var/www/html/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #27 /var/www/html/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #28 /var/www/html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #29 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #30 {main} Next Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144 Stack trace: #0 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(347): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(861): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #3 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(931): Zend_Db_Adapter_Abstract->quote('default', NULL) #4 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1372): Zend_Db_Adapter_Abstract->quoteInto('{{fieldName}} =...', 'default', NULL, NULL) #5 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(2830): Magento\Framework\DB\Adapter\Pdo\Mysql->quoteInto('{{fieldName}} =...', 'default') #6 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(2814): Magento\Framework\DB\Adapter\Pdo\Mysql->_prepareQuotedSqlCondition('{{fieldName}} =...', 'default', '`scope`') #7 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(477): Magento\Framework\DB\Adapter\Pdo\Mysql->prepareSqlCondition('`scope`', 'default') #8 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(408): Magento\Framework\Data\Collection\AbstractDb->_getConditionSql('`scope`', 'default') #9 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(390): Magento\Framework\Data\Collection\AbstractDb->_translateCondition('scope', 'default') #10 /var/www/html/vendor/magento/module-store/Model/ResourceModel/Config/Collection/Scoped.php(59): Magento\Framework\Data\Collection\AbstractDb->addFieldToFilter('scope', 'default') #11 /var/www/html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php(124): Magento\Store\Model\ResourceModel\Config\Collection\Scoped->_initSelect() #12 /var/www/html/vendor/magento/module-store/Model/ResourceModel/Config/Collection/Scoped.php(48): Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection->__construct(Object(Magento\Framework\Data\Collection\EntityFactory), Object(Magento\Framework\Logger\Monolog), Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query), Object(Magento\Framework\Event\Manager\Proxy), NULL, Object(Magento\Config\Model\ResourceModel\Config\Data)) #13 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Store\Model\ResourceModel\Config\Collection\Scoped->__construct(Object(Magento\Framework\Data\Collection\EntityFactory), Object(Magento\Framework\Logger\Monolog), Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Config\Model\ResourceModel\Config\Data), 'default', NULL, NULL) #14 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Store\\M...', Array) #15 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Store\\M...', Array) #16 /var/www/html/var/generation/Magento/Store/Model/ResourceModel/Config/Collection/ScopedFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Store\\M...', Array) #17 /var/www/html/vendor/magento/module-store/Model/Config/Reader/DefaultReader.php(62): Magento\Store\Model\ResourceModel\Config\Collection\ScopedFactory->create(Array) #18 /var/www/html/vendor/magento/framework/App/Config/ScopePool.php(112): Magento\Store\Model\Config\Reader\DefaultReader->read() #19 /var/www/html/vendor/magento/framework/App/Config.php(45): Magento\Framework\App\Config\ScopePool->getScope('default', NULL) #20 /var/www/html/vendor/magento/framework/App/Config.php(58): Magento\Framework\App\Config->getValue('web/secure/use_...', 'default', NULL) #21 /var/www/html/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag('web/secure/use_...') #22 /var/www/html/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #24 /var/www/html/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(26): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #25 /var/www/html/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #26 /var/www/html/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #27 /var/www/html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #28 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #29 {main}