getting error while re migration database

When we remigrate database using ub data migration  pro then i am getting error CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user ‘demo8’@’localhost’ (using password: YES)

see in:screenshot- https://prnt.sc/qby28t
  1. How to remigrate magento 1 database to magento 2.2.6. please guide me.

10 answers

Profile photo of Mall Staff 184060.00 $tone December 17, 2019
Public

Hi there,

 SQLSTATE[HY000] [1045] Access denied for user ‘demo8’@’localhost’ (using password: YES)

That issue relates to the database settings. Please re-update with the correct databases credentials in the database configuration file of our migration tool at: pub/ub-tool/protected/config/db.php

How to remigrate magento 1 database to magento 2.2.6. please guide me.

You can run the delta migration in all steps by running CLI commands with the ‘update’ mode (you can learn more about the CLI commands via the Readme manual that comes packed with your download package).

Alternatively, you can reset data migration in all steps and then, migrate from ground up in all steps of our migration tool once again. Or, if possible, please consider to install a new fresh M2 instance and our module to proceed with migration again.
 
Regards,
Mall.
 

#1
Profile photo of Orange Mantra 160.00 $tone December 18, 2019
Public

Hi Mall 
We had previously migrated the following data from Magento 1 website to our Magento 2 website using the UB data migration tool:-
1. Customers:- 39108
2. Orders:- 91200

Now the current live count are as follows (in Magento 1 website):- 
1. Customers:- 39572
2. Orders:- 93117
The data difference is:- 
Customers:- 39572 -- 39108 = 464
Orders:- 93117 -- 91200 = 1917
We have to migrate 464 customers and 1917 orders using the UB data migration tool. So kindly let us know if there is any quick or shortest way to do that. 
Currently the tool is running the batches for customers in 100 and checking all records one by one. We want to migrate only 464 customers and 1917 orders only which have been recently added but the tool is checking every data from the beginning and running the batches accordingly which is a time consuming process. 
So kindly guide us here and if there is any short method to migrate only the newly added data/records then please let us know. 
Regards 
Orangemantra 

#2
Profile photo of Mall Staff 184060.00 $tone December 18, 2019
Public

Hi there,
 
In order to migrate newly added data objects in M1, you simply click the ‘RUN’ button in the backend dashboard of our migration tool. Alternatively, you can run the CLI command without the ‘update’ mode. Please refer to our Readme manual (included in your download package) for further info about the CLI commands.
 
Regards,
Mall.

#3
Profile photo of Orange Mantra 160.00 $tone December 18, 2019
Public

Hi Mall,
I am getting error when re migrating customer data.
#6 migration completed with 100 Customers
Processing in step #6……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….[Processing] Step #6 migration completed with 100 Customers
Processing in step #6……………………………………………………………………………………….
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘26539’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `customer_address_entity` (`is_active`, `entity_id`, `parent_id`, `created_at`, `updated_at`, `country_id`, `firstname`, `lastname`, `street`, `telephone`, `city`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10)
please help me to solve this issue.

#4
Profile photo of Mall Staff 184060.00 $tone December 18, 2019
Public

Hi there,

1062 Duplicate entry ‘26539’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `customer_address_entity` (`

To solve that issue, you can do these steps:

+ Run this SQL query in your M2 database to delete the customer address added in M2 after the first migration:

Delete From customer_address_entity Where entity_id = 26539;

+ Once done, you can continue with the data migration in step #6.

Regards,
Mall.

#5
Profile photo of Orange Mantra 160.00 $tone December 19, 2019
Public

Hi Mall,
I am getting error when migrating orders 
root@devserver:/var/www/html/demo8.mobdigi.com# php -f bin/ubdatamigration run --step=7
Processing in step #7…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………PHP Error[8]: Trying to get property of non-object
in file /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php at line 1412
#0 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php(1310): Step7Controller->_migrateSalesQuote()
#1 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php(246): Step7Controller->_migrateSalesOrders()
#2 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/commands/RunCommand.php(58): Step7Controller->actionRun()
#3 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /var/www/html/demo8.mobdigi.com/bin/ubdatamigration(4): require_once()

#6
Profile photo of Mall Staff 184060.00 $tone December 19, 2019
Public

Hi there,

PHP Error[8]: Trying to get property of non-object
in file /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php at line 1412

Please try with these steps:
+ Run the following CLI command:
php -f bin/ubdatamigration rmdeleted --step=7

+ Once done, continue with the data migration in step #7:
php -f bin/ubdatamigration run --step=7
 
Regards,
Mall.

#7
Profile photo of Orange Mantra 160.00 $tone December 19, 2019
Public

Hi Mall,
I ran following command . i am getting error again.
Please try with these steps:
+ Run the following CLI command:
php -f bin/ubdatamigration rmdeleted --step=7

+ Once done, continue with the data migration in step #7:
php -f bin/ubdatamigration run --step=7
 

root@devserver:/var/www/html/demo8.mobdigi.com# php -f bin/ubdatamigration rmdeleted --step=7
Yii command runner (based on Yii v1.1.19)
Usage: bin/ubdatamigration <command-name> [parameters…]
The following commands are available:
-- cleanduplicateurl
-- fixduplicateurl
-- message
-- migrate
-- reset
-- run
-- shell
-- webapp
To see individual command help, use the following:
bin/ubdatamigration help <command-name>
root@devserver:/var/www/html/demo8.mobdigi.com# php -f bin/ubdatamigration run --step=7
Processing in step #7…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………PHP Error[8]: Trying to get property of non-object
in file /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php at line 1412
#0 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php(1310): Step7Controller->_migrateSalesQuote()
#1 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/controllers/Step7Controller.php(246): Step7Controller->_migrateSalesOrders()
#2 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/commands/RunCommand.php(58): Step7Controller->actionRun()
#3 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /var/www/html/demo8.mobdigi.com/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /var/www/html/demo8.mobdigi.com/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /var/www/html/demo8.mobdigi.com/bin/ubdatamigration(4): require_once()
root@devserver:/var/www/html/demo8.mobdigi.com#

#8
Profile photo of Mall Staff 184060.00 $tone December 19, 2019
Public

Hi there,
 
Please follow additional steps below:

+ Run these SQLs in your M2 database:

DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule' AND m2_id NOT IN (Select rule_id From salesrule); 
DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule_coupon' AND m2_id NOT IN (Select coupon_id From salesrule_coupon);
DELETE FROM ub_migrate_map_step_7_order_item WHERE entity_name = 'sales_flat_order_item' AND m2_id NOT IN (Select item_id From sales_order_item);
DELETE FROM ub_migrate_map_step_7_order_address WHERE entity_name = 'sales_flat_order_address' AND m2_id NOT IN (Select entity_id From sales_order_address);
DELETE FROM ub_migrate_map_step_7_quote WHERE entity_name = 'sales_flat_quote' AND m2_id NOT IN (Select entity_id From quote);
DELETE FROM ub_migrate_map_step_7_quote_item WHERE entity_name = 'sales_flat_quote_item' AND m2_id NOT IN (Select item_id From quote_item);
DELETE FROM ub_migrate_map_step_7_quote_address WHERE entity_name = 'sales_flat_quote_address' AND m2_id NOT IN (Select address_id From quote_address);

+ Clean the cache of our module by running the command:
rm -rf pub/ub-tool/protected/runtime/cache/

+ And then, you can continue with the data migration in step #7.
 
Regards,
Mall.

#10

Please login or Register to Submit Answer

Written By

Comments