cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order Grid can not be copied

SOLVED

Sales Order Grid can not be copied

Please, I have been facing this error for the past 6 weeks, I would be grateful if I can get help here. I have searched and searched but couldn't find a solution. I am migrating from Magento 1.9.1.0 to Magento 2.3.1 and I keep getting this errors below. Thank you 

[2019-06-15 16:03:37][ERROR]: Document sales_flat_order_grid can not be copied directly because of error: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'magento'@'localhost' for table 'sales_flat_order_grid', query was: INSERT INTO `sales_order_grid` SELECT sales_order.entity_id AS `entity_id`, sales_order.status AS `status`, sales_order.store_id AS `store_id`, sales_order.store_name AS `store_name`, sales_order.customer_id AS `customer_id`, sales_order.base_grand_total AS `base_grand_total`, sales_order.base_total_paid AS `base_total_paid`, sales_order.grand_total AS `grand_total`, sales_order.total_paid AS `total_paid`, sales_order.increment_id AS `increment_id`, sales_order.base_currency_code AS `base_currency_code`, sales_order.order_currency_code AS `order_currency_code`, trim(concat(ifnull(sales_shipping_address.firstname, ''), ' ' ,ifnull(sales_shipping_address.lastname, ''))) AS `**bleep**, ''))) AS `shipping_address`, sales_order.shipping_description AS `shipping_information`, sales_order.customer_email AS `customer_email`, sales_order.customer_group_id AS `customer_group`, sales_order.base_subtotal AS `subtotal`, sales_order.base_shipping_amount AS `shipping_and_handling`, trim(concat(ifnull(sales_order.customer_firstname, ''), ' ' ,ifnull(sales_order.customer_lastname, ''))) AS `customer_name`, (SELECT `sales_order_payment`.`method`             FROM `sales_order_payment` as sales_order_payment             WHERE (`parent_id` = sales_order.entity_id) LIMIT 1) AS `payment_method`, sales_order.total_refunded AS `total_refunded`, null AS `signifyd_guarantee_status` FROM `sales_order`  LEFT JOIN `sales_order_address` AS `sales_shipping_address` ON sales_order.shipping_address_id = sales_shipping_address.entity_id  LEFT JOIN `sales_order_address` AS `sales_billing_address` ON sales_order.billing_address_id = sales_billing_address.entity_id WHERE (sales_order.entity_id in (SELECT `sales_flat_order_grid`.`entity_id` FROM `karacomn_mage`.`sales_flat_order_grid`)) ON DUPLICATE KEY UPDATE `status` = VALUES(`status`), `store_id` = VALUES(`store_id`), `store_name` = VALUES(`store_name`), `customer_id` = VALUES(`customer_id`), `base_grand_total` = VALUES(`base_grand_total`), `base_total_paid` = VALUES(`base_total_paid`), `grand_total` = VALUES(`grand_total`), `total_paid` = VALUES(`total_paid`), `increment_id` = VALUES(`increment_id`), `base_currency_code` = VALUES(`base_currency_code`), `order_currency_code` = VALUES(`order_currency_code`), `shipping_name` = VALUES(`shipping_name`), `billing_name` = VALUES(`billing_name`), `created_at` = VALUES(`created_at`), `updated_at` = VALUES(`updated_at`), `billing_address` = VALUES(`billing_address`), `shipping_address` = VALUES(`shipping_address`), `shipping_information` = VALUES(`shipping_information`), `customer_email` = VALUES(`customer_email`), `customer_group` = VALUES(`customer_group`), `subtotal` = VALUES(`subtotal`), `shipping_and_handling` = VALUES(`shipping_and_handling`), `customer_name` = VALUES(`customer_name`), `payment_method` = VALUES(`payment_method`), `total_refunded` =100% [============================] Remaining Time: < 1 sec

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Sales Order Grid can not be copied

Hi @charmming 
It looks like that there are some issue with database user permission for the database on the server. 

error which you are getting:

denied to user 'magento'@'localhost'

Please make sure that your database user "magento" have full access for the used database. 

 

I hope it will help you!

If you have already full access, then try "127.0.0.1" instead of localhost in configuration file. 

View solution in original post

4 REPLIES 4

Re: Sales Order Grid can not be copied

Hi @charmming 
It looks like that there are some issue with database user permission for the database on the server. 

error which you are getting:

denied to user 'magento'@'localhost'

Please make sure that your database user "magento" have full access for the used database. 

 

I hope it will help you!

If you have already full access, then try "127.0.0.1" instead of localhost in configuration file. 

Re: Sales Order Grid can not be copied

i tried your observation i did not get the error any but i did got another error which is 

 

[2019-06-18 03:46:13][WARNING]: Mismatch of entities in the document: inventory_source_item Source: 7535 Destination: 7203
[2019-06-18 03:46:13][WARNING]: Volume Check failed

 and after migration finished...i ran the setupgrade, compile and deploy mode, reindex, cache but when i tried to open the All customer page it gave me the below error. Please help me.

 

{"0":"Type Error occurred when creating object: Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Config","1":"<pre>#1 Magento\\Framework\\ObjectManager\\Factory\\Compiled->create('Magento\\Eav\\Mode...', array()) called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:56]\n#2 Magento\\Framework\\ObjectManager\\ObjectManager->create('Magento\\Eav\\Mode...', array()) called at [vendor\/magento\/framework\/Validator\/UniversalFactory.php:36]\n#3 Magento\\Framework\\Validator\\UniversalFactory->create('Magento\\Eav\\Mode...') called at [vendor\/magento\/module-eav\/Model\/Entity\/Attribute\/AbstractAttribute.php:641]\n#4 Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute->getSource() called at [vendor\/magento\/module-customer\/Model\/AttributeMetadataConverter.php:68]\n#5 Magento\\Customer\\Model\\AttributeMetadataConverter->createMetadataAttribute(&Magento\\Customer\\Model\\Attribute#0000000067aa633c000000002b7d916f#) called at [vendor\/magento\/module-customer\/Model\/Metadata\/CustomerMetadata.php:87]\n#6 Magento\\Customer\\Model\\Metadata\\CustomerMetadata->getAttributeMetadata('customerstatus') called at [vendor\/magento\/module-customer\/Model\/Metadata\/CustomerMetadata.php:119]\n#7 Magento\\Customer\\Model\\Metadata\\CustomerMetadata->getAllAttributesMetadata() called at [vendor\/magento\/module-customer\/Model\/Metadata\/CachedMetadata.php:85]\n#8 Magento\\Customer\\Model\\Metadata\\CachedMetadata->getAllAttributesMetadata() called at [vendor\/magento\/module-customer\/Ui\/Component\/Listing\/AttributeRepository.php:78]\n#9 Magento\\Customer\\Ui\\Component\\Listing\\AttributeRepository->getList() called at [vendor\/magento\/module-customer\/Ui\/Component\/Listing\/Columns.php:102]\n#10 Magento\\Customer\\Ui\\Component\\Listing\\Columns->prepare() called at [vendor\/magento\/framework\/View\/Layout\/Generator\/UiComponent.php:164]\n#11 Magento\\Framework\\View\\Layout\\Generator\\UiComponent->prepareComponent(&Magento\\Customer\\Ui\\Component\\Listing\\Columns#0000000067aa67ff000000002b7d916f#) called at [vendor\/magento\/framework\/View\/Layout\/Generator\/UiComponent.php:161]\n#12 Magento\\Framework\\View\\Layout\\Generator\\UiComponent->prepareComponent(&Magento\\Ui\\Component\\Listing#0000000067aa67fe000000002b7d916f#) called at [vendor\/magento\/framework\/View\/Layout\/Generator\/UiComponent.php:142]\n#13 Magento\\Framework\\View\\Layout\\Generator\\UiComponent->generateComponent(&Magento\\Framework\\View\\Layout\\Data\\Structure#0000000067aa6e7f000000002b7d916f#, 'customer_listing', array('attributes' => array('group' => '', 'component' => '', 'aclResource' => '', 'visibilityCondit...' => array())), &Magento\\Framework\\View\\Layout\\Interceptor#0000000067aa6e86000000002b7d916f#) called at [vendor\/magento\/framework\/View\/Layout\/Generator\/UiComponent.php:102]\n#14 Magento\\Framework\\View\\Layout\\Generator\\UiComponent->process(&Magento\\Framework\\View\\Layout\\Reader\\Context#0000000067aa6501000000002b7d916f#, &Magento\\Framework\\View\\Layout\\Generator\\Context#0000000067aa673f000000002b7d916f#) called at [vendor\/magento\/framework\/View\/Layout\/GeneratorPool.php:81]\n#15 Magento\\Framework\\View\\Layout\\GeneratorPool->process(&Magento\\Framework\\View\\Layout\\Reader\\Context#0000000067aa6501000000002b7d916f#, &Magento\\Framework\\View\\Layout\\Generator\\Context#0000000067aa673f000000002b7d916f#) called at [vendor\/magento\/framework\/View\/Layout.php:343]\n#16 Magento\\Framework\\View\\Layout->generateElements() called at [vendor\/magento\/framework\/View\/Layout\/Builder.php:129]\n#17 Magento\\Framework\\View\\Layout\\Builder->generateLayoutBlocks() called at [vendor\/magento\/framework\/View\/Page\/Builder.php:55]\n#18 Magento\\Framework\\View\\Page\\Builder->generateLayoutBlocks() called at [vendor\/magento\/framework\/View\/Layout\/Builder.php:65]\n#19 Magento\\Framework\\View\\Layout\\Builder->build() called at [vendor\/magento\/framework\/View\/Layout.php:253]\n#20 Magento\\Framework\\View\\Layout->build() called at [vendor\/magento\/framework\/View\/Layout.php:875]\n#21 Magento\\Framework\\View\\Layout->getBlock('menu') called at [vendor\/magento\/module-backend\/Model\/View\/Result\/Page.php:26]\n#22 Magento\\Backend\\Model\\View\\Result\\Page->setActiveMenu('Magento_Customer...') called at [vendor\/magento\/module-customer\/Controller\/Adminhtml\/Index\/Index.php:28]\n#23 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:108]\n#24 Magento\\Framework\\App\\Action\\Action->dispatch(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/module-backend\/App\/AbstractAction.php:231]\n#25 Magento\\Backend\\App\\AbstractAction->dispatch(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#26 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#)) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#27 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/module-backend\/App\/Action\/Plugin\/Authentication.php:143]\n#28 Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(&Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor#0000000067aa61eb000000002b7d916f#, &Closure#0000000067aa61e5000000002b7d916f#, &Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#29 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#30 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#), NULL) called at [generated\/code\/Magento\/Customer\/Controller\/Adminhtml\/Index\/Index\/Interceptor.php:26]\n#31 Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/App\/FrontController.php:159]\n#32 Magento\\Framework\\App\\FrontController->processRequest(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#, &Magento\\Customer\\Controller\\Adminhtml\\Index\\Index\\Interceptor#0000000067aa61eb000000002b7d916f#) called at [vendor\/magento\/framework\/App\/FrontController.php:99]\n#33 Magento\\Framework\\App\\FrontController->dispatch(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#34 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#)) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#35 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#36 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#), array(array('default_store_se...', 'page_cache_from_...', 'storeCookieValid...', 'install', 'configHash'))) called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:26]\n#37 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#0000000067aa66ff000000002b7d916f#) called at [vendor\/magento\/framework\/App\/Http.php:136]\n#38 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:258]\n#39 Magento\\Framework\\App\\Bootstrap->run(&Magento\\Framework\\App\\Http\\Interceptor#0000000067aa6615000000002b7d916f#) called at [index.php:39]\n<\/pre>","url":"\/admin\/customer\/index\/index\/key\/d1ee2aeb7f01d80b4dad604c2a131e393fd26935767a2c252777912e7c814828\/","script_name":"\/index.php"}root@mail:/var/www/html/magento2/var/report#

Re: Sales Order Grid can not be copied

Re: Sales Order Grid can not be copied

Still finding a way to solve this error... I have searched and tried all that I know... please any help will be helpful...