我已将moodle数据库文件从旧服务器URLold =(https://example1.com)移至新服务器URLnew =(https://example2.com)。现在我想使用moodle提供的查找和替换工具将URLold替换为数据库表中的URLnew。但是当我执行操作时,我收到此错误。我该怎么办?请帮忙。
我收到错误
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table = REPLACE(table, 'https://example1.com', 'https://example2.com')' at line 1
UPDATE mdl_pma_history SET table = REPLACE(table, ?, ?)
[array (
0 => 'https://example1.com',
1 => 'https://example2.com',
)]
Error code: dmlwriteexception
Stack trace:
line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 895 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 6787 of /lib/adminlib.php: call to mysqli_native_moodle_database->execute()
line 74 of /admin/tool/replace/index.php: call to db_replace()
答案 0 :(得分:0)
所以我自己得到了答案
必须删除导致错误的mdl_pma_history表。我遵循的步骤如下。
完成。