Error querying database. Cause: java.sql.SQLException: The user specified as a definer (''@'') doe
来源:互联网 发布:node req.session 编辑:程序博客网 时间:2024/05/22 10:53
公司内部测试环境的mysql里的函数用navicat导入到生产环境后,调用报错:
org.springframework.jdbc.UncategorizedSQLException:### Error querying database. Cause: java.sql.SQLException: The user specified as a definer (''@'') does not exist
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### Cause: java.sql.SQLException: The user specified as a definer (''@'') does not exist
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1449]; The user specified as a definer (''@'') does not exist; nested exception is java.sql.SQLException: The user specified as a definer (''@'') does not exist
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy31.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.$Proxy54.findSiteByAuditStatus(Unknown Source)
at com.ido.frame.modules.netlink.site.service.SiteBaseService.findSiteByAuditStatus(SiteBaseService.java:714)
。。。。。。
看报错信息是没有‘’@‘’这个用户,于是网上查了些资料,有以下几种解决方法:
一、直接修改函数的definer为应用程序所使用的mysql的用户。(也可能是用户没有权限导致的,这种情况就直接授权就可以了)
二、将函数的安全性由difiner修改为invoker。如下图:
三、不使用navicat导入这种方式创建函数,直接使用命令创建函数,此时不指定definer。
以上三种方法前两种试过都可以,第三种在网上看的有的人说是可以的,就整理出来了。
0 0
- Error querying database. Cause: java.sql.SQLException: The user specified as a definer (''@'') doe
- ### Cause: java.sql.SQLException: The user specified as a definer ('root'@'%') does not exist
- Cause: java.sql.SQLException: The user specified as a definer ('root'@'%') does not exist
- Caused by: java.sql.SQLException: The user specified as a definer ('mail'@'%
- java.sql.SQLException: The user specified as a definer ('root'@'%') does not exist
- Caused by: java.sql.SQLException: The user specified as a definer ('eln'@'%') does not exist
- java.sql.SQLException: The user specified as a definer ('root'@'%') does not exist 解决方法
- Mysql java.sql.SQLException: The user specified as a definer ('ht_release'@'%') does not exist
- java.sql.SQLException: The user specified as a definer ('myroot'@'%') does not exist
- java.sql.SQLException: The user specified as a definer ('root'@'%') does not exist 解决方法
- mysql 存储过程的权限问题 java.sql.SQLException: The user specified as a definer ('xxxx'@'%') does not exist
- FAQ(12):Error querying database. Cause: java.sql.SQLException
- Error querying database. Cause: java.sql.SQLException: ORA-00911: 无效字符
- Error querying database. Cause: java.sql.SQLException: Query execution was interrupted
- Error querying database. Cause: java.sql.SQLException: 无法从套接字读取更多的数据
- ERROR 1449 (HY000): The user specified as a definer ('admin_isbox'@'%') does not exist-j解决方案
- ERROR 1449 (HY000): The user specified as a definer ('db'@'%') does not exist
- mysqldump: Got error: 1449: The user specified as a definer 的解决方案!
- 说说JSON和JSONP,也许你会豁然开朗
- 积跬步,聚小流------html知识大纲归纳总结
- Android应用性能优化之使用SparseArray替代HashMap
- 如何打开一个文件夹并选中该文件夹中的某个文件
- 【MySQL】计算 TPS,QPS 的方式
- Error querying database. Cause: java.sql.SQLException: The user specified as a definer (''@'') doe
- 我不敢!⋯⋯⋯⋯致所有拼搏的年輕人
- android手机短信转发+隐藏应用程序图片+开机自启
- linux vmstat命令详解
- 关闭Tomcat日志输出catalina.out
- iOS8以iOS8以下的系统present一个半透明的ViewController的方法
- Git学习笔记(建库)
- Swift2.2 学习笔记(十三) ___函数
- java import javax.mail.*报错原因