Parse mysql database restore error: of mysql Error Code: 1005 errno 121
- 2020-05-27 07:22:42
The reason for this is that the primary key must be unique, which means that there may be some overlap between the database and the existing restore database. a restriction that Foreign Keys be uniquely named throughout the database. One effective method is to clean up the original database and then create the restore.
The reason for me this time is that the newly installed mysql ibdata1 backup file has been replaced by the ibdata1 backup file of the previous database. I intended to restore it through this method, but I failed. As a result, I made a mistake when restoring the database of the previous data with the backup sql file.