MySqlException: The user specified as a definer ('root'@'%') does not exist解决方法
之前因为MySql安全问题,将root@%改为允许特定ip段进行远程连接,结果有一个接口报The user specified as a definer ('root'@'%') does not exist。

先确定到报错所涉及的表,然后查看了存储过程、触发器、视图等,最后发现有一个触发器的definer是root@%,但是这个已经被我改掉了

然后删掉这个触发器,在服务器重新建立这个触发器,此时definer为root@localhost,然后程序正常执行。
总结:因为之前创建触发器时默认的definer为root@%(目前已经不存在),导致mysql认为现在的用户无权限访问该触发器,解决方法就是在当前用户下重建该触发器。
数据库修改mysql.user后应检查,存储过程、触发器、视图等。
MySqlException: The user specified as a definer ('root'@'%') does not exist解决方法的更多相关文章
- mysql 数据库数据迁移 The user specified as a definer ('root'@'%') does not exist 解决方法
从一个数据库数据迁移到本地localhost 程序在调用到数据库的视图时报错,直接在数据库中打开视图时也报错,类似: mysql 1449 : The user specified as a defi ...
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
权限问题,授权 给 root 所有sql 权限 mysql> grant all privileges on *.* to root@"%" identified by & ...
- Java调用存储过程时报 The user specified as a definer ('root'@'%') does not exist 解决方法
Caused by: java.sql.SQLException: The user specified as a definer (''@'') does not exist at c ...
- The user specified as a definer ('root'@'%') does not exist 解决方法
mysql> grant all privileges on *.* to root@"%" identified by "."; Query OK, r ...
- The user specified as a definer ('root'@'%') does not exist解决
转自:https://www.cnblogs.com/hanxue53/p/5850263.html 解决方法: 2.进入mysql的安装路径之前,要确保你的mysql服务是开启的: 在DOS命令窗口 ...
- The user specified as a definer (”@sa’%') does not exist 解决方法
mysql数据库报错The user specified as a definer (”@sa’%') does not exist.尝试过两种方式,第一种重启之后好用,但是一会就又不好用了.第二种算 ...
- mysql:The user specified as a definer ('xxx'@'%') does not exist 解决方法
发生这种问题.大概率是用户不存在或者是权限不够 用户不存在.用可视化工具新建一个. 权限不够 ,运行下面命令: 如:我的错误: The user specified as a definer ('mo ...
- mysql 1449 : The user specified as a definer ('usertest'@'%') does not exist 解决方法 (grant 授予权限)
从服务器上迁移数据库到本地localhost 执行 函数 时报错, mysql 1449 : The user specified as a definer ('usertest'@'%') do ...
- 4. mysql 1449 : The user specified as a definer ('test'@'%') does not exist 解决方法
权限问题,授权 给 root 所有sql 权限 mysql> grant all privileges on *.* to test@"%" identified by & ...
随机推荐
- thrust
thrust - Bing dictionary US[θrʌst]UK[θrʌst] v.刺:塞:冲:挤 n.刺:插:重点:猛推 网络推力:插入:戳 变形Plural Form:thrusts:Pr ...
- mongo嗅探器mongosniff
mongo嗅探器 在更高版本被mongoreplay取代. 安装: 在Ubuntu直接apt-get install mongodb即包含有. 使用方法 直接--help查看使用方法,一般使用: mo ...
- Spring框架的配置文件分开管理(了解)
1. 例如:在src的目录下又多创建了一个配置文件,现在是两个核心的配置文件,那么加载这两个配置文件的方式有两种! * 主配置文件中包含其他的配置文件: <import resource=&qu ...
- 【深度好文】多线程之WaitHandle-->派生-》Mutex信号量构造
bool flag = false; System.Threading.Mutex mutex = new System.Threading.Mutex(true, "Test", ...
- 获取url路径中的参数
简介 运用js的时候,我们有时可能会有这样的需求,就是想要获取浏览器地址栏指定的一项参数,形如:https://i.cnblogs.com/EditPosts.aspx?postid=8628413& ...
- UNIX和类UNIX操作系统
- boost 学习(1)
智能指针的学习 中文教程网站 http://zh.highscore.de/cpp/boost/ 不过代码可能 由于BOOST 版本不同需要稍作修改 scoped_ptr 离开作用域则自动调用类析构函 ...
- jsp传中文乱码问题 encodeURIComponent()编码方法
方法一: jQuery.ajax({ type:"POST", url:"${ctx}/offer.do", ...
- samtools 工具
软件地址: http://www.htslib.org/ 功能三大版块 : Samtools Reading/writing/editing/indexing/viewing SAM/BAM/CRAM ...
- pyspider示例代码六:传递参数
传递参数 示例一 #!/usr/bin/env python # -*- encoding: utf- -*- # vim: ts= sts= ff=unix fenc=utf8: # Created ...