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日 ...
随机推荐
- HTML、CSS基础知识
前端基础 1. CSS 8 1.1. CSS叫做层叠样式表,用来设置页面中元素的样式.背景颜色.字体颜色.字体大小... 8 1.2. CSS负责结构.表现.行为中的表现 8 1.3. 编写的位置 8 ...
- 两个对象值相同(x.equals(y)==true),但却可有不同的hashcode这句话对吗?
1.这句话当然不对啦,请参看官方文档给出的解释! hashCode public int hashCode()返回该对象的哈希码值.支持此方法是为了提高哈希表(例如 java.util.Hashtab ...
- php: $$str
这种写法称为可变变量有时候使用可变变量名是很方便的.就是说,一个变量的变量名可以动态的设置和使用.一个普通的变量通过声明来设置,例如: <?php$a = "hello";? ...
- MQTT版本升级过程及源码解析
MQTT版本升级过程及源码解析 首先说一下为什么要写这篇文章呢,在我发现网上对MQTT的文章介绍实在太少了,可能也是使用这个的频率比较低吧!还有对问题的定位以及解决的方式和办法也太少了,所以特意写这篇 ...
- mysql客户端 navicat 本地导入sql文件出错
以前遇到过这个问题,找了半天度娘没解决,然后就放弃了. 因为是自己 demo 的项目 所以就自己手动建表了. 现在实习了,去到公司下载下代码来,拿上sql 导入发现还是报错, 根本没法整,然后自己都不 ...
- ThinkPHP3.2.2实现持久登录(记住我)功能的方法
实现持久登录,即用户在登录时,勾选了"记住我"之后,无论是否关闭浏览器,只要不退出登录,在指定的时间内始终保持登录状态(缺点是在另一台电脑上登录过后,之前那台电脑就不能继续保持登录 ...
- 【读一本书】《昇腾AI处理器架构与编程》--神经网络基础知识(2)
1 卷积神经网络:输入层 之前提到多层感知机的参数太多,导致训练耗时长并且对图像处理也不具有优势,因此大神们 就提出了多层神经网络,其中最经典的是卷积神经网络(Convolution Neural N ...
- 华为云WeLink:智能工作空间,联接无限想象
[中国,上海,2019年9月19日] 在HUAWEI CONNECT 2019期间,华为办公应用装备部部长王俊先生代表华为云介绍WeLink--企业专属的智能工作空间.WeLink源于华为数字化办公实 ...
- 给各位PHP程序员十点未来的建议
PHP 从诞生到现在已经有20多年历史,从Web时代兴起到移动互联网退潮,互联网领域各种编程语言和技术层出不穷, Node.js . GO . Python 不断地在挑战 PHP 的地位.这些技术的推 ...
- ecosystem.config
ecosystem.config.js module.exports = { apps : [{ name : 'TOB_NODE', script : 'app.js', // 开发环境变量 env ...