Magento 2 – Data Migration Tool Not Connecting to Remote Server

magento2magento2-migration-tool

Im trying to migrate from magento1 to magento2. Installed data migration tool. filled everything out correctly in my config file.

             <source>
            <database host="mymagento1.com" name="magento1db" user="magento1user" 
    password="mypassword"/>
            </source>
            <destination>
            <database host="localhost" name="magentodb2" user="magento2user" 
password="mypassword"/>
            </destination>

my magento 1 install is on a remote server. I have enabled remote access to that database.

Problem I having is when I run

/magento migrate:settings --reset

/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/config.xml

I get this error

[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [1045] Access denied for user
'magento1user'@'s1.mydomain.com' (using password: YES)

[PDOException]
SQLSTATE[HY000] [1045] Access denied for user
'magento1user'@'s1.mydoamin.com' (using password: YES)

Seems to be trying to use my magento1 user name to connect to my localhost server to make a connection. I did not specify my hostname for my localhost (destination server) and while running the migrate command it responds back with my hostname from destination and my username from source.

I also added in

<source_prefix>magento1user</source_prefix>
<dest_prefix>magento2user</dest_prefix> 

I get the same results.
Am I missing something?

Best Answer

Please change

 <source>
  <database host="localhost" name="old magento database name" user="old database user 
    name" password="old db host password"/>
 </source>
 <destination>
  <database host="localhost" name="new magento database name" user="oldnew database 
   user 
   name" password="new db host password"/>
 </destination>

And also add after that

<options>
 <crypt_key>Old magento version key from oldVersion_folder\app\etc\local.xml 
 </crypt_key>
</options>

That`s it. After make these changes your code working. Best of luck.

Related Topic