mysql 1449 : The user specified as a definer ('test01'@'%') does not exist 解决方法
来源:互联网 发布:gta5优化怎么样 编辑:程序博客网 时间:2024/06/03 14:48
今天在项目中写junit测试更新mysql表数据的时候,运行测试的时报了The user specified as a definer ('test01'@'%') does not exist,
数据不能成功插入,用root用户连接的数据库,后来到数据库去看的时候发现update触发器写的是 /*!50017 DEFINER = 'test01'@'%' */,
把test01改为了root后junit可以正确执行了。definer 定义了trigger中sql语句在执行时候的权限,test01没有这个执行权限导致的。
在网上搜了一下,很多人都说给用户赋予权限就可以了
解决方法:
用root登录mysq
执行
mysql >grant all privileges on *.* to root@"%" identified by "Passwd" ;
mysql >flush privileges;
0 0
- mysql 1449 : The user specified as a definer ('test01'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
- Longest Palindromic SubString -- LeetCode
- 十种数组排序方法
- POJ 1080 解题报告
- springmvc实现多文件上传
- 阿里,20150402春季实习生招聘在线试题(单选部分+附加题)
- mysql 1449 : The user specified as a definer ('test01'@'%') does not exist 解决方法
- Javascript自动为对象添加getter/setter方法(闭包方式)
- VS2013编译duilibv1.1,“找不到Riched20.lib”的问题
- 分享一个自己精简、避免无端联网的 Delphi XE8 欢迎页面
- 用程序实现对数组a[45,96,78,6,18,66,50]中的元素进行排序
- 无笔不看书,强制放慢你的阅读速度
- [LeetCode] Construct Binary Tree from Inorder and Postorder Traversal
- [LeetCode 79]Word Search
- 面向对象 继承(extends)