Mysql5.7升级到8.0.2问题记录
ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin
导致此问题原因
- 数据表没有主键
- 数据库引擎不是
innodb
查询问题SQL
- 查询没有主键的数据库表
-- 查询没有主键的数据库表
SELECT T.*
FROM INFORMATION_SCHEMA.`TABLES` T
LEFT JOIN INFORMATION_SCHEMA.COLUMNS C
ON T.TABLE_NAME= C.TABLE_NAME
AND T.TABLE_SCHEMA = C.TABLE_SCHEMA
AND C.COLUMN_KEY ='PRI'
WHERE T.TABLE_SCHEMA ='数据库名称'
AND C.TABLE_NAME IS NULL;
-
查询数据表引擎类型不等于
InnoDB
SELECT * FROM INFORMATION_SCHEMA.`TABLES` WHERE TABLE_SCHEMA='DJYPT_XXDB' AND ENGINE <>'InnoDB'; -- 修改数据库引擎方式 alter table table_name engine=InnoDB;