更改 MySQL 集群用户的主机

Changing hosts for MySQL Cluster Users

我有一个 MariaDB 集群,有时我需要为某些用户更改我的主机,但是,这些更改不会传播到整个集群。

假设UPDATE mysql.user SET host = '10.99.0.%' WHERE host = '%' AND user != 'root';

这是正常情况吗?我需要在每个集群成员中进行每个更改。

我做错了吗?

谢谢。

系统表是MyISAM,Galera默认不会复制MyISAM表的更新,是known limitation:

Currently replication works only with the InnoDB storage engine. Any writes to tables of other types, including system (mysql.*) tables are not replicated (this limitation excludes DDL statements such as CREATE USER, which implicitly modify the mysql.* tables — those are replicated). There is however experimental support for MyISAM - see the wsrep_replicate_myisam system variable)

如果您决定尝试 wsrep_replicate_myisam,请小心,"experimental" 表示不稳定,不建议用于生产。