I am trying to migrate a magento1 shop to magento2 on another server. I did install the migration tool and configure everything correctly. Here is an example of my config.xml:

            <database host="mymagento1.com" name="magento1db" user="magento1user" 
            <database host="localhost" name="magentodb2" user="magento2user" 

after executing this command:

php bin/magento migrate:settings --reset vendor/magento/data-migration-tool/etc/opensource-to-opensource/

i get the following error:

  SQLSTATE[HY000] [1045] Access denied for user 'magento1user'@'localhost' (using password: YES)

It seems the migration tool is trying to connect to the Magento2 database with the magento1 user. I also tried with the magento2 server IP instead of localhost but I get the same error. I triple checked the DB credentials, everything is correct... I found mutiple posts with the same issue but no solution.


The magento migration tool cannot connect your magento 1 database. Try one thing. Import your Magento 1 database in you localhost and change the credentials in config.xml and try it again. Remember, no need to run --reset command, it works when you will try to re-migrate.

  • Let me know if this helps. Best of luck :-) – Sayan Basak Feb 17 '18 at 19:03
  • I imported the source DB on the new server, it now works :) – user6800816 Feb 17 '18 at 19:15
  • sounds great :) – Sayan Basak Feb 17 '18 at 19:18

both of your databases are in different servers? Yes you are right, at the time of migration Magento tries to connect both of the databases,if it connects successfully then your Magento 1 settings and data will be migrated.

  • yes, different servers – user6800816 Feb 17 '18 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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