bash ERROR 3098 (HY000): 该表不符合外部插件的要求
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53268697/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin
提问by Kyle Anderson
SETUP:
设置:
- Three mysql group replication nodes in master master master.
- All work fine. I can add users/dbs and insert/update data.
- Each node is bound to a private IP address.
- I created a bash script to connect to mysql to delete users.
- Deleting a database with a script works fine.
- master master 中的三个mysql组复制节点。
- 一切正常。我可以添加用户/数据库并插入/更新数据。
- 每个节点都绑定到一个私有 IP 地址。
- 我创建了一个 bash 脚本来连接到 mysql 以删除用户。
- 使用脚本删除数据库工作正常。
PROBLEM:
问题:
The following commands will NOT run. I can create users and databases and delete databases but cant delete the users. I cant tell if its a replication issue OR a privilege issue.
以下命令将不会运行。我可以创建用户和数据库并删除数据库,但不能删除用户。我不知道是复制问题还是权限问题。
- DELETE FROM mysql.user WHERE user='testme123';
- DELETE FROM mysql.db WHERE user='testme123';
- DROP USER IF EXISTS 'testme123';
- 从 mysql.user 中删除 user='testme123';
- 从 mysql.db 中删除用户 ='testme123';
- 如果存在'testme123',则删除用户;
ERROR 3098 (HY000) at line 1: The table does not comply with the requirements by an external plugin.
第 1 行的 ERROR 3098 (HY000):该表不符合外部插件的要求。
LOG: [ERROR] Plugin group_replication reported: 'Table user does not use the InnoDB storage engine. This is not compatible with Group Replication.
日志:[错误] 插件 group_replication 报告:'表用户不使用 InnoDB 存储引擎。这与组复制不兼容。
I get same error via local mysql console too logged in as root.
我也通过本地 mysql 控制台以 root 身份登录得到同样的错误。
QUESTION(S):
问题):
- What could be preventing this?
- How can I troubleshoot what it is I am missing?
- 什么可以阻止这种情况?
- 我该如何解决我遗漏的问题?
回答by Rick James
If you are using Group Replication (in 5.7 or 8.0), you must do all user authentication through the GRANT/DROP/CREATE USER/etc commands, not INSERT/UPDATE/DELETE/etc.
如果您使用的是组复制(在 5.7 或 8.0 中),则必须通过 GRANT/DROP/CREATE USER/etc 命令进行所有用户身份验证,而不是 INSERT/UPDATE/DELETE/etc。
MyISAM is not replicated in Group Replication due to serious technical difficulties.
由于严重的技术困难,MyISAM 在 Group Replication 中没有被复制。
(The above comments apply to Galera / PXC, too.)
(以上评论也适用于 Galera / PXC。)
(Caveat: What I have said may not be strictly true, but I think it will keep you out of trouble, and address the Question at hand.)
(警告:我所说的可能并不完全正确,但我认为这会让你远离麻烦,并解决手头的问题。)
回答by Shudipta Sharma
In my case, I got the same error while restoring the backup from a single-primary mode MySQL Replication Group. I took backup using --single-transaction
flag during mysqldump
cmd.
就我而言,我在从单主模式 MySQL 复制组恢复备份时遇到了同样的错误。我--single-transaction
在mysqldump
cmd期间使用flag 进行了备份。
$ mysqldump -uroot -p<root_password> -h<host> --set-gtid-purged=OFF --single-transaction --all-databases --triggers --routines --events < dump.sql
Here, see the usage of --single-transaction
flag for the problem it causes.
在这里,请参阅--single-transaction
flag的用法以解决它导致的问题。
$ mysqldump --help
...
--single-transaction
Creates a consistent snapshot by dumping all tables in a
single transaction. Works ONLY for tables stored in
storage engines which support multiversioning (currently
only InnoDB does); the dump is NOT guaranteed to be
consistent for other storage engines. While a
--single-transaction dump is in process, to ensure a
valid dump file (correct table contents and binary log
position), no other connection should use the following
statements: ALTER TABLE, DROP TABLE, RENAME TABLE,
TRUNCATE TABLE, as consistent snapshot is not isolated
from them. Option automatically turns off --lock-tables.
...
So, after reading the suggestion @RickJames provided, I just remove the --single-transaction
flag from the mysqldump
cmd during backup and then restored it to a new Replication Group.
因此,在阅读了@RickJames 提供的建议后,我只是在备份期间--single-transaction
从mysqldump
cmd 中删除了该标志,然后将其恢复到一个新的复制组。
Note:MySQL server version was 5.7.25
注意:MySQL 服务器版本为 5.7.25