之前因为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解决方法的更多相关文章

  1. mysql 数据库数据迁移 The user specified as a definer ('root'@'%') does not exist 解决方法

    从一个数据库数据迁移到本地localhost 程序在调用到数据库的视图时报错,直接在数据库中打开视图时也报错,类似: mysql 1449 : The user specified as a defi ...

  2. mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法

    权限问题,授权 给 root  所有sql 权限 mysql> grant all privileges on *.* to root@"%" identified by & ...

  3. 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 ...

  4. The user specified as a definer ('root'@'%') does not exist 解决方法

    mysql> grant all privileges on *.* to root@"%" identified by "."; Query OK, r ...

  5. The user specified as a definer ('root'@'%') does not exist解决

    转自:https://www.cnblogs.com/hanxue53/p/5850263.html 解决方法: 2.进入mysql的安装路径之前,要确保你的mysql服务是开启的: 在DOS命令窗口 ...

  6. The user specified as a definer (”@sa’%') does not exist 解决方法

    mysql数据库报错The user specified as a definer (”@sa’%') does not exist.尝试过两种方式,第一种重启之后好用,但是一会就又不好用了.第二种算 ...

  7. mysql:The user specified as a definer ('xxx'@'%') does not exist 解决方法

    发生这种问题.大概率是用户不存在或者是权限不够 用户不存在.用可视化工具新建一个. 权限不够 ,运行下面命令: 如:我的错误: The user specified as a definer ('mo ...

  8. mysql 1449 : The user specified as a definer ('usertest'@'%') does not exist 解决方法 (grant 授予权限)

    从服务器上迁移数据库到本地localhost 执行  函数  时报错, mysql 1449 : The user specified as a definer ('usertest'@'%') do ...

  9. 4. mysql 1449 : The user specified as a definer ('test'@'%') does not exist 解决方法

    权限问题,授权 给 root  所有sql 权限 mysql> grant all privileges on *.* to test@"%" identified by & ...

随机推荐

  1. Openvpn 日常问题解决

    一.Openven的在windows系统下的使用: 1.Openven客户端2.2.0:http://pan.baidu.com/s/1sjJij4T 安装好客户端软件后,将服务器下发的证书和配置文件 ...

  2. 跳跃游戏 12 · Jump Game 12

    跳跃游戏 1 [抄题]: [思维问题]: [一句话思路]: [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): [画图]: [一刷]: 由于要用itera ...

  3. 国内maven仓库地址

    Maven 中央仓库地址: 1.http://mvnrepository.com/ (推荐) 2.http://mirrors.ibiblio.org/maven2/ 3.http://repo1.m ...

  4. 03 解析库之Beautifulsoup模块

    Beautifulsoup模块   一 介绍 Beautiful Soup 是一个可以从HTML或XML文件中提取数据的Python库.它能够通过你喜欢的转换器实现惯用的文档导航,查找,修改文档的方式 ...

  5. laravel数据库操作

    一.配置文件路径:/.env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT= DB_DATABASE=test DB_USERNAME=root DB_P ...

  6. Netty 源码 NioEventLoop(一)初始化

    Netty 源码 NioEventLoop(一)初始化 Netty 系列目录(https://www.cnblogs.com/binarylei/p/10117436.html) Netty 基于事件 ...

  7. Python 函数装饰器简明教程

    定义类的静态方法时,就使用了装饰器.其实面向对象中的静态方法都是使用了装饰器. @staticmethod def jump(): print(" 3 meters high") ...

  8. 安卓编译 translate error Lint: How to ignore “<key> is not translated in <language>” errors?

    Add following at the header of your strings.xml file <resources xmlns:tools="http://schemas. ...

  9. 2018.06.27Going Home(二分图匹配)

    Going Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24716 Accepted: 12383 Descript ...

  10. WebService测试工具介绍及下载

    1 LoadRunner  LoadRunner,是一种预测系统行为和性能的负载测试工具.通过以模拟上千万用户实施并发负载及实时性能监测的方式来确认和查找问 题,LoadRunner能够对整个企业架构 ...