cancel
Showing results for 
Search instead for 
Did you mean: 

Server to Local Migration for Upgrade

Server to Local Migration for Upgrade

Hello, since my server in 1 month will update the php version excluding the 7.3.3 I am forced to update my site, so I decided to make the changes and updates locally.

But first I started to buckup the db and installed xampp file and imported the db and the server files into the htdocs folder.

When I go to http: // localhost / MY_SITE / I get the following error. Can someone help me?

PDOException: SQLSTATE[HY000] [1045] Access denied for user 'SITO_MIO'@'localhost' (using password: YES) in C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php:128 Stack trace: #0 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(128): PDO->__construct('mysql:host=loca...', 'SITO_MIO', '9864959laterza', Array) #1 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(406): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #4 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array) #5 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(542): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array) #6 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(617): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT `main_ta...', Array) #7 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array) #8 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\Db\FetchStrategy\Query.php(21): Zend_Db_Adapter_Abstract->fetchAll(Object(Magento\Framework\DB\Select), Array) #9 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(778): Magento\Framework\Data\Collection\Db\FetchStrategy\Query->fetchAll(Object(Magento\Framework\DB\Select), Array) #10 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(674): Magento\Framework\Data\Collection\AbstractDb->_fetchAll(Object(Magento\Framework\DB\Select)) #11 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(577): Magento\Framework\Data\Collection\AbstractDb->getData() #12 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(562): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false) #13 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection.php(835): Magento\Framework\Data\Collection\AbstractDb->load() #14 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Source\RuntimeConfigSource.php(82): Magento\Framework\Data\Collection->getIterator() #15 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Source\RuntimeConfigSource.php(62): Magento\Config\App\Config\Source\RuntimeConfigSource->loadConfig() #16 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config\ConfigSourceAggregated.php(40): Magento\Config\App\Config\Source\RuntimeConfigSource->get('') #17 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System\Reader.php(60): Magento\Framework\App\Config\ConfigSourceAggregated->get() #18 C:\xampp\htdocs\SITO_MIO\generated\code\Magento\Config\App\Config\Type\System\Reader\Proxy.php(95): Magento\Config\App\Config\Type\System\Reader->read() #19 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(402): Magento\Config\App\Config\Type\System\Reader\Proxy->read() #20 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(247): Magento\Config\App\Config\Type\System->readData() #21 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(300): Magento\Config\App\Config\Type\System->lockedLoadData(Object(Closure)) #22 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(206): Magento\Config\App\Config\Type\System->loadDefaultScopeData('default') #23 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(180): Magento\Config\App\Config\Type\System->getWithParts('default/newreli...') #24 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(131): Magento\Config\App\Config\Type\System->get('default/newreli...') #25 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(80): Magento\Framework\App\Config->get('system', 'default/newreli...') #26 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(93): Magento\Framework\App\Config->getValue('newrelicreporti...', 'default', NULL) #27 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-new-relic-reporting\Model\Config.php(94): Magento\Framework\App\Config->isSetFlag('newrelicreporti...') #28 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-new-relic-reporting\Plugin\HttpPlugin.php(49): Magento\NewRelicReporting\Model\Config->isNewRelicEnabled() #29 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Interception\Interceptor.php(121): Magento\NewRelicReporting\Plugin\HttpPlugin->beforeCatchException(Object(Magento\Framework\App\Http\Interceptor), Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #30 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #31 C:\xampp\htdocs\SITO_MIO\generated\code\Magento\Framework\App\Http\Interceptor.php(39): Magento\Framework\App\Http\Interceptor->___callPlugins('catchException', Array, Array) #32 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #33 C:\xampp\htdocs\SITO_MIO\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #34 {main} Next Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1045] Access denied for user 'SITO_MIO'@'localhost' (using password: YES) in C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php:144 Stack trace: #0 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(406): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #3 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array) #4 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(542): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array) #5 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(617): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT `main_ta...', Array) #6 C:\xampp\htdocs\SITO_MIO\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array) #7 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\Db\FetchStrategy\Query.php(21): Zend_Db_Adapter_Abstract->fetchAll(Object(Magento\Framework\DB\Select), Array) #8 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(778): Magento\Framework\Data\Collection\Db\FetchStrategy\Query->fetchAll(Object(Magento\Framework\DB\Select), Array) #9 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(674): Magento\Framework\Data\Collection\AbstractDb->_fetchAll(Object(Magento\Framework\DB\Select)) #10 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(577): Magento\Framework\Data\Collection\AbstractDb->getData() #11 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection\AbstractDb.php(562): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false) #12 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Data\Collection.php(835): Magento\Framework\Data\Collection\AbstractDb->load() #13 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Source\RuntimeConfigSource.php(82): Magento\Framework\Data\Collection->getIterator() #14 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Source\RuntimeConfigSource.php(62): Magento\Config\App\Config\Source\RuntimeConfigSource->loadConfig() #15 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config\ConfigSourceAggregated.php(40): Magento\Config\App\Config\Source\RuntimeConfigSource->get('') #16 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System\Reader.php(60): Magento\Framework\App\Config\ConfigSourceAggregated->get() #17 C:\xampp\htdocs\SITO_MIO\generated\code\Magento\Config\App\Config\Type\System\Reader\Proxy.php(95): Magento\Config\App\Config\Type\System\Reader->read() #18 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(402): Magento\Config\App\Config\Type\System\Reader\Proxy->read() #19 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(247): Magento\Config\App\Config\Type\System->readData() #20 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(300): Magento\Config\App\Config\Type\System->lockedLoadData(Object(Closure)) #21 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(206): Magento\Config\App\Config\Type\System->loadDefaultScopeData('default') #22 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-config\App\Config\Type\System.php(180): Magento\Config\App\Config\Type\System->getWithParts('default/newreli...') #23 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(131): Magento\Config\App\Config\Type\System->get('default/newreli...') #24 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(80): Magento\Framework\App\Config->get('system', 'default/newreli...') #25 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Config.php(93): Magento\Framework\App\Config->getValue('newrelicreporti...', 'default', NULL) #26 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-new-relic-reporting\Model\Config.php(94): Magento\Framework\App\Config->isSetFlag('newrelicreporti...') #27 C:\xampp\htdocs\SITO_MIO\vendor\magento\module-new-relic-reporting\Plugin\HttpPlugin.php(49): Magento\NewRelicReporting\Model\Config->isNewRelicEnabled() #28 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Interception\Interceptor.php(121): Magento\NewRelicReporting\Plugin\HttpPlugin->beforeCatchException(Object(Magento\Framework\App\Http\Interceptor), Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #29 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #30 C:\xampp\htdocs\SITO_MIO\generated\code\Magento\Framework\App\Http\Interceptor.php(39): Magento\Framework\App\Http\Interceptor->___callPlugins('catchException', Array, Array) #31 C:\xampp\htdocs\SITO_MIO\vendor\magento\framework\App\Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->catchException(Object(Magento\Framework\App\Bootstrap), Object(Zend_Db_Adapter_Exception)) #32 C:\xampp\htdocs\SITO_MIO\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #33 {main}
5 REPLIES 5

Re: Server to Local Migration for Upgrade

Check out the below solutions:
1 . check DB Host , Port
DB host = 127.0.0.1 instead of localhost

2. in app/etc/env.php
check username/password , change password

3 check DEFINER in table
grep -rnw ./db_name.sql -e 'DEFINER'
sed -i 's/DEFINER=`SITO_MIO`@`localhost`/ /g' DBname.sql

Problem solved? Click Kudos and "Accept as Solution"

Re: Server to Local Migration for Upgrade

sorry but I did not understand point 3. can you explain me with more steps?

Re: Server to Local Migration for Upgrade

sorry but I did not understand point 3. can you explain me with more steps?

Re: Server to Local Migration for Upgrade

Please check the app/etc/env.php file all database information is right.

 

'db' => 
  array (
    'table_prefix' => '',
    'connection' => 
    array (
      'default' => 
      array (
        'host' => '[Yourhost]',
        'dbname' => '[DBName]',
        'username' => '[DbUser]',
        'password' => '[DbPassword]',
        'active' => '1',
      ),
    ),
  )

 

Re: Server to Local Migration for Upgrade


@arjunkumar9fce wrote:

Please check the app/etc/env.php file all database information is right.

 

'db' => 
  array (
    'table_prefix' => '',
    'connection' => 
    array (
      'default' => 
      array (
        'host' => '[Yourhost]',
        'dbname' => '[DBName]',
        'username' => '[DbUser]',
        'password' => '[DbPassword]',
        'active' => '1',
      ),
    ),
  )

 


Amazing Content on this website. I Like it. Thanks for sharing.