Home > Database > Mysql Tutorial > body text

解析mysql数据库还原错误:(mysql Error Code: 1005 errno 121)

WBOY
Release: 2016-06-07 16:17:04
Original
1004 people have browsed it

原因大致是主键必须是唯一的,也就是数据库里可能存在和现还原数据库有重复的地方,a restriction that Foreign Keys should be uniquely named throughout the database , 一个有效的办法就是将原来的数据库清除后再创建还原。 本人这回的原因是新装的mysq

原因大致是主键必须是唯一的,也就是数据库里可能存在和现还原数据库有重复的地方,a restriction that Foreign Keys should be uniquely named throughout the database , 一个有效的办法就是将原来的数据库清除后再创建还原。

本人这回的原因是新装的mysql的ibdata1备份文件被我换成之前数据库的ibdata1备份文件了,本来想通过这方法来强制还原的,,但是没做到,结果用备份sql文件还原以前数据的数据库时也出错,将被替换的ibdata1文件再还原回去即可解决。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!