MySQL 错误:#1062 - 重复条目“rewrite_rules”对于键 2

发布于 2024-10-21 13:03:23 字数 300 浏览 3 评论 0原文

我正在尝试从最近的备份恢复 WordPress MySQL 数据库,因为在我错误地更改了 site_url 后,我的网站 (wp-admin) 变得不可用。我正在尝试再次重新安装整个站点,但需要重新安装数据库。问题是我的 wp_options 表不会通过 PHPmyAdmin 上传。我得到的错误是:

#1062 - 密钥 2 的条目“rewrite_rules”重复

我对 MySQL 知之甚少,但这似乎很奇怪,因为在我删除它以尝试重新安装之前数据库运行良好。

有人可以建议吗?

I am trying to restore a WordPress MySQL DB from a recent backup since my site (wp-admin) became unusable after I changed the site_url incorrectly. I am trying to reinstall the entire site again but need to reinstall the DB. The problem is my wp_options table will not upload via PHPmyAdmin. The error I get is:

#1062 - Duplicate entry 'rewrite_rules' for key 2

I know little about MySQL but this seems odd as the DB was working happily before I deleted it to attempt the reinstall.

Can anyone please advise?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥醉 2024-10-28 13:03:23

该错误意味着您将数据插入到必须是唯一的列中。

在这种情况下,您可能会将“rewrite_rules”作为行中数据项的数据导入到已将“rewrite_rules”作为列中行数据项的表中,并标记为唯一。

如果您要从头开始重新安装 WordPress 并尝试导入旧数据,则需要先执行几个步骤。请参阅下面的链接了解一些说明

http://www.ehow.com/how_4579080_export-导入-wordpress-blog.html

The error means that you are inserting data into a column with must be unique.

In this case you may be importing data that has 'rewrite_rules' as a data item in a row into a table that already has 'rewrite_rules' as a data item in a row in a column that as been marked as unique.

If you are reinstalling wordpress from scratch and are trying to import the old data over the top you need to take a few steps first. See the link below for some instructions

http://www.ehow.com/how_4579080_export-import-wordpress-blog.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文