mySql中The user specified as a definer ('root'@'%') does not exist
背景
最近往现场导了个库,发现功能报错,一看是视图报错,navicat一看,哎呦,直接报错。The user specified as a definer ('root'@'%') does not exist。
解决办法
因为视图的人在创建的时候

他选择了定义者才能执行。于是当你切换到其他用户当然不行啦。
解决办法1
如果你只有当前用户,你没有root用户的密码,建议你删除当前视图,复制好语句,重新建立。
解决办法2
如果你有高级用户的权限输入命令
grant all privileges on *.* to root@"%" identified by ".";
flush privileges;
将root换成你要授权的用户。
解决办法3
将范围改成

补充一点
针对于视图的安全性补充一下。
definer
当定义为DEFINER时,必须数据库中存在DEFINER指定的用户,并且该用户拥有对应的操作权限,才能成功执行。与当前用户是否有权限无关。
invoker
当定义为INVOKER时,只要执行者有执行权限,就可以成功执行。
mySql中The user specified as a definer ('root'@'%') does not exist的更多相关文章
- MYSQL : The user specified as a definer ('root'@'%') does not exist
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 解决方法: 2.进入mysql ...
- [bug] MySQL: The user specified as a definer ('root'@'%') does not exist
错误1 gciantispider.getchildlst does not exist 原因 getchildlst创建失败 解决 在mysql中设置mysqld中加上log_bin_trust_f ...
- MySql 数据库 SQLException: The user specified as a definer ('root'@'%') does not exist 错误原因及解决办法
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 经查明:是用户root并没有获 ...
- Mysql 查询视图出现The user specified as a definer ('root'@'%') does not exist的问题
今天服务器Mysql版本在5.7升级到8.0+之后,部分网站(老的)访问视图出现The user specified as a definer ('root'@'%') does not exist问 ...
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist ,mysql 赋给用户权限 grant all privileges on
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法 遇到了 SQLException: acce ...
- The user specified as a definer ('root'@'%') does not exist
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 解决方法: 2.进入mysql ...
- 本机jdbc连接报The user specified as a definer ('root'@'%') does not exist
昨晚一台测试服务器连接本机的mysql时,有些调用存储过程报"The user specified as a definer ('root'@'%') does not exist" ...
- MySqlException: The user specified as a definer ('root'@'%') does not exist解决方法
之前因为MySql安全问题,将root@%改为允许特定ip段进行远程连接,结果有一个接口报The user specified as a definer ('root'@'%') does not e ...
- msyqld 的 The user specified as a definer ('root'@'%') does not exist 问题
msyqld 的 The user specified as a definer ('root'@'%') does not exist 问题 造成问题:搭建网站时显示内容不完整. 跟踪tomcat日 ...
随机推荐
- TypeError: Cannot read property '_t' of undefined (VUE + ElementUI + i18n)
在使用vue的ElementUI库,在多语言时报错: TypeError: Cannot read property '_t' of undefined 错误是在点菜单栏时随机抛出的,F12抓不到,只 ...
- 2019-11-26:密码学基础知识,csrf防御
信息安全的基础是数学--->密码算法--->安全协议(ssl VPN)-->应用(证书 PKI)密码学入门密码编码学:研究加解密算法的学科密码分析学:研究破译密码算法的学科 加解密分 ...
- 依赖注入利器 - Dagger ‡
转载请标明出处:http://blog.csdn.net/shensky711/article/details/53715960 本文出自: [HansChen的博客] 概述 声明需要注入的对象 如何 ...
- KFC-位置分页爬虫
import requests import json if name == 'main': #记录总数 raw_count=0 #查询页数 page=1 #存储数据 data=[] #判断有无数据条 ...
- 【并发编程】Object的wait、notify和notifyAll方法
本博客系列是学习并发编程过程中的记录总结.由于文章比较多,写的时间也比较散,所以我整理了个目录贴(传送门),方便查阅. 并发编程系列博客传送门 方法简介 wait方法 wait方法是Object类中的 ...
- python中字典数据类型常用操作
创建字典 字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包括在花括号({})中 ,格式如下所示: ...
- 记录我的 python 学习历程-Day02-while 循环/格式化输出/运算符/编码的初识
一.流程控制之--while 循环 循环就是重复做同一件事,它可以终止当前循环,也可以跳出这一次循环,继续下一次循环. 基本结构(基本循环) while 条件: 循环体 示例 # 这是一个模拟音乐循环 ...
- Java泛型之上、下界通配符的理解(适合初学)
泛型的由来 为什么需要泛型 Java的数据类型一般都是在定义时就需要确定,这种强制的好处就是类型安全,不会出现像弄一个ClassCastException的数据给jvm,数据安全那么执行的clas ...
- oracle创建jobs定时任务报错:PLS-00306: wrong number or types of arguments in call to 'JOB'
原脚本: begin sys.dbms_job.submit(job => job, what => 'xxx;', ...
- mysql 替换 tab 键 (\t)
update t_instance set instance_name = replace(instance_name,'\t','') , host_name = replace(host_name ...