1

"Could not receive Stock Item data" line appear instead of the product grid in the admin side. I have recently imported other DB to my Cloud local setup.

When I'm doing indexing, I'm getting an error like this:

SQLSTATE[HY000]: General error: 1449 The user specified as a definer (''@'%') do
es not exist, query was: DELETE `price_index`  FROM `catalog_product_index_price
_temp` AS `price_index`
 INNER JOIN `catalog_product_entity` AS `product_entity` ON product_entity.entit
y_id = price_index.entity_id AND (product_entity.created_in <= 1 AND product_ent
ity.updated_in > 1)
 LEFT JOIN `inventory_stock_1` AS `inventory_stock` ON inventory_stock.sku = pro
duct_entity.sku WHERE (inventory_stock.is_salable = 0 OR inventory_stock.is_sala
ble IS NULL) AND (price_index.website_id = 1) AND (price_index.entity_id IN ('7'
, '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '2
1', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34'
, '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47',
'48', '49', '50', '51', '52', '53', '54', '55', '56', '58', '59', '60', '61', '6
2', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75'
, '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88',
'89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100', '101',
'102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '11
3', '114', '115', '116', '117', '118', '119', '122', '123', '124', '125', '126',
 '127', '128', '129', '130', '131', '132', '133', '134', '135', '136', '137', '1
38', '139', '140', '141', '142', '143', '144', '145', '146', '147', '148', '149'
, '150', '151', '152', '153', '154', '155', '156', '157', '158', '159', '160', '
161', '162', '163', '164', '165', '166', '167', '169', '170', '171', '172', '174
', '175', '176', '177', '178', '179', '180', '181', '182', '183', '184', '185',
'186', '187', '189', '190', '191', '192', '193', '194', '195', '196', '197', '19
8', '199', '200', '201', '202', '203', '204', '205', '206', '207', '208', '209',
 '210', '211', '212', '213', '214', '215', '216', '217', '218', '219', '220', '2
21', '222', '223', '224', '225', '226', '227'))

Kindly help me.

1 Answer 1

3

It's happening because when you migrate your DB the inventory_stock_1 was not created, you can run this SQL below in your DB to fix it.

If needed, change the root user and localhost address.

DELIMITER $$

ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `inventory_stock_1` AS 
SELECT DISTINCT
  `legacy_stock_status`.`product_id`   AS `product_id`,
  `legacy_stock_status`.`website_id`   AS `website_id`,
  `legacy_stock_status`.`stock_id`     AS `stock_id`,
  `legacy_stock_status`.`qty`          AS `quantity`,
  `legacy_stock_status`.`stock_status` AS `is_salable`,
  `product`.`sku`                      AS `sku`
FROM (`cataloginventory_stock_status` `legacy_stock_status`
   JOIN `catalog_product_entity` `product`
     ON ((`legacy_stock_status`.`product_id` = `product`.`entity_id`)))$$

DELIMITER ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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