错误 SQL查询:
CREATE TABLE `wp_commentmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `comment_id` (`comment_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
MySQL said: Documentation
#1050 - Table 'wp_commentmeta' already exists
最佳答案
我遇到了这个问题,发现即使您删除了 wp_commentmeta
表,您也可能会遇到其他表的问题,例如 wp_comments
、wp_links
等
因此,解决方案就是删除整个数据库,重新创建一个新的数据库并恢复到原来的状态。为此,请登录 mysql:
mysql -u databaseuser -p
然后在您的数据库上运行以下命令:
drop database wordpress_database;
create database wordpress_database;
quit;
关于mysql - #1050 - 表 'wp_commentmeta' 已经存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43035826/