简体   繁体   中英

How to convert MAIN mysql database to InnoDB from MyIsam

I am trying to manage mysql group replication and I noticed a problem when manipulating users and grants . 10 of the main mysql tables in the main mysql database are MyIsam. So I cant add databases or user permissions because they fail and wont replicate. Master-master group replication requirs everything InnoDB.

ALTER TABLE works fine on regular custom databases/tables but how do you fix this on the main mysql database?

I tried this but they all fail:

ALTER TABLE mysql.db ENGINE = InnoDB;
ALTER TABLE mysql.tables_priv ENGINE = InnoDB;
ALTER TABLE mysql.user ENGINE = InnoDB;

ERROR: ERROR 1726 (HY000): Storage engine 'InnoDB' does not support system tables.

Another error running CREATE USER...

[ERROR] Plugin group_replication reported: 'Table db does not use the InnoDB storage engine. This is not compatible with Group Replication'

ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin group_replication.

Server version: 5.7.23-log MySQL Community Server

DO NOT CHANGE THE ENGINE FOR SYSTEM TABLES

MySQL has not yet changed the code enough to allow for mysql.* to be anything other than MyISAM. MySQL 8.0 makes the change by turning the tables (the "data dictionary") into a InnoDB tables, with radically different structure and capabilities.

Since you are at 5.7.23, you are only one (big) step away from 8.0.xx. Consider upgrading.

Replication works with MyISAM tables, but clustering replication does not -- Galera and Group Replication deal with those MyISAM tables in other ways. See the documentation on what happens with GRANT , CREATE USER , etc. Do not use UPDATE and INSERT to manipulate the login-related tables.

(The Author of this Question seems to have fixed the problem by uninstalling a plugin.)

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM