PDOException while installation in M2
-
07-10-2020 - |
Question
[ERROR] exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`m2mar1317`.`cms_page`, CONSTRAINT `CMS_PAGE_PAGE_ID_SEQUENCE_CMS_PAGE_SEQUENCE_VALUE` FOREIGN KEY (`page_id`) REFERENCES `sequence_cms_page` (`sequence_value`) ON DELETE CASCADE)
How to fix this issue?
Solution
The issue was fixed after contacting magento support. The default dB table engine should be InnoDB and mine was MyISAM, and as a result, causing this error.
To change the default DB engine in /etc/my.cnf
set the following:
default-storage-engine=InnoDB
instead of
default-storage-engine=MyISAM
After making these changes, installation went successful.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange