报错信息:ERROR 1356 (HY000): View ‘information_schema.SCHEMATA’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
说明:查看用户信息_schema.SCHEMATA模式’引用无效的表或列或函数,或者视图的定义者/调用者没有使用它们的权限
场景:mysql集群在出现异常后,执行select 命令时提示如上,没有办法进行查询操作,说用户权限不足。
处理方法:
mysql> use mysql;
Database changed
mysql> select * from user where User ='mysql.infoschema'\G;
*************************** 1. row ***************************
Host: localhost
User: mysql.infoschema
Select_priv: N
mysql> update user set Select_priv = 'Y' where User = 'mysql.infoschema';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
报错信息:[ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates. To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .
说明:[错误]WSREP:从此节点引导群集可能不安全。它不是最后一个离开集群的,并且可能不包含所有更新。要对此节点强制群集引导,请编辑格拉斯泰特.dat手动文件并将safe\ to\ bootstrap设置为1。
场景:三节点集群,第一节点引导,二、三节点加入集群,模拟故障,停掉(停mysql服务)第一节点,此时二三节点会重新选择引导节点,然后启动一节点重新加入集群。报如上错误。
处理方案(常规操作)
systemctl start mysqld
如果执行上述命令无法加入集群。尝试重启主机,然后再次启动mysql服务即可。