将数据库复制到新的 table 后,我们遇到了一些问题并且升级命令无法显示这些类型的错误
We facing some issue after copy db into new table and upgrade command is not working showing these type of error
SQLSTATE[23000]:违反完整性约束:1062 键 'CORE_CONFIG_DATA_SCOPE_SCOPE_ID_PATH' 的重复条目 'default-0-general/region/display_all',查询为:INSERT INTO core_config_data
(scope
, scope_id
, path
, value
) 值 (?, ?, ?, ?)
在 reindex 命令中 => 目录搜索索引器进程未知错误:
警告:第 341 行 /var/www/html/pashmina/suitings/vendor/magento/module-eav/Model/Config.php 中为 foreach() 提供的参数无效
像这样复制数据库后你应该不会有任何问题。
mysqldump --host='localhost' --user='user' --password='password' --databases your_db --add-drop-table --debug-info --comments --dump-date --disable-keys --extended-insert --single-transaction --quick --verbose --result-file='dev_dump.sql'
然后在另一台电脑上像这样加载它
mysql --host='localhost' --user='anotheruser' --password='anotherpassword' < dev_dump.sql
SQLSTATE[23000]:违反完整性约束:1062 键 'CORE_CONFIG_DATA_SCOPE_SCOPE_ID_PATH' 的重复条目 'default-0-general/region/display_all',查询为:INSERT INTO core_config_data
(scope
, scope_id
, path
, value
) 值 (?, ?, ?, ?)
在 reindex 命令中 => 目录搜索索引器进程未知错误: 警告:第 341 行 /var/www/html/pashmina/suitings/vendor/magento/module-eav/Model/Config.php 中为 foreach() 提供的参数无效
像这样复制数据库后你应该不会有任何问题。 mysqldump --host='localhost' --user='user' --password='password' --databases your_db --add-drop-table --debug-info --comments --dump-date --disable-keys --extended-insert --single-transaction --quick --verbose --result-file='dev_dump.sql' 然后在另一台电脑上像这样加载它 mysql --host='localhost' --user='anotheruser' --password='anotherpassword' < dev_dump.sql