网站首页 / 资讯 / Magento教程/ Magento2.x教程

解决部分MAGENTO2数据库导出导入时出错

作者:admin

如,在老版本的数据库中MYSQL5.6被支持,但是在MAGENTO2.4中仅支持5.7+,但是当导出老版本数据库再导入新版本中时会报错

Query:
CREATE TABLE `catalog_product_website` (
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`product_id`,`website_id`),
  KEY `IDX_CATALOG_PRODUCT_WEBSITE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Catalog Product To Website Linkage Table'

Error occured at:2023-03-10 14:55:31
Line no.:4508
Error Code: 1031 - Table storage engine for 'catalog_product_website' doesn't have this option
Table storage engine for 'catalog_product_website' doesn't have this option

这种时候,可能 使用

sed -ie 's/ROW_FORMAT=FIXED//g' backup.sql

或是

sed -ie 's/ROW_FORMAT=FIXED/ROW_FORMAT=COMPACT/g' backup.sql



移除数据库中的ROW_FORMAT=FIXED ROW_FORMAT=COMPACT.


当然也可以添加

[mysqld]
innodb_strict_mode = off

关闭数据库的严格模式

标签:
上一篇:怎样解决 The website with id 1 that was requested wasn't found.
下一篇:M2在结账时出现Internal Error. Details are available in Magneto log files.Report ID:webapi-****

相关内容

最近更新
相关产品
综合服务邮箱: magento2#foxmail.com