MySQL 报错处理汇总(持续更新)

报错信息: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服务即可。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值