all product page showing 404 and i could not access admin pages magento 2

by prabhakaran7   Last Updated August 14, 2019 08:09 AM

I have copied Magento 2 backup to new server

now i am getting

all product page showing 404 and i could not access admin pages magento 2

exception.log

main.CRITICAL: Unique constraint violation found {"exception":"[object] (Magento\Framework\Exception\AlreadyExistsException(code: 0): Unique constraint violation found at /public_html/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php:425, Magento\Framework\DB\Adapter\DuplicateException(code: 1062): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO mg_report_event (logged_at, event_type_id, object_id, subtype, store_id) VALUES ('2019-08-14 07:24:45', ?, ?, ?, ?) at public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:580, Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO mg_report_event (logged_at, event_type_id, object_id, subtype, store_id) VALUES ('2019-08-14 07:24:45', ?, ?, ?, ?) at public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' at /vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

I have tried this answer but not working

https://stackoverflow.com/a/49789752

Does anyone know how to solve this??



Answers 1


If the values inside mg_report_event table is not so important. You may truncate the table. Login into your database and run

TRUNCATE TABLE mg_report_event
oliver
oliver
August 14, 2019 08:04 AM

Related Questions


Updated May 08, 2015 12:10 PM

Updated June 25, 2018 08:09 AM

Updated July 27, 2019 12:09 PM

Updated July 06, 2016 08:03 AM