While I'm trying to import a .sql backup in phpmyadmin , I get this error :
****Error**
SQL query:
--
-- Dumping data for table `wp_commentmeta`
--
INSERT INTO `wp_commentmeta` ( `meta_id` , `comment_id` , `meta_key` , `meta_value` )
VALUES ( 2, 2, '_wp_trash_meta_status', '0' ) , ( 3, 2, '_wp_trash_meta_time', '1398086942' ) ;
MySQL said:
1062 - Duplicate entry '2' for key 'PRIMARY'**
What should I do?
Truncate your current table and try it again (TRUNCATE your_table;)
OR DELETE FROM your_table WHERE your_ID_field LIKE 2
IF your ID field is AUTO_INCREMENT field you can slove it like this
INSERT INTO `wp_commentmeta` ( `meta_key` , `meta_value` ) VALUES ('_wp_trash_meta_status', '0' ), ('_wp_trash_meta_time', '1398086942' ) ;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.