java 执行mysql 8.0.11存储过程报错The user specified as a definer ('root'@'10.%.%.%') does not exist解决办法
执行存储过程,报错
java.sql.SQLException: The user specified as a definer ('root'@'10.%.%.%') does not exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:388)
at com.mysql.cj.jdbc.CallableStatement.execute(CallableStatement.java:809)
at com.paxunke.smart.utils.MysqlUtils.execWriteReportProc(MysqlUtils.java:260)
at com.paxunke.smart.testcase.Test.main(Test.java:125)
执行 grant all privileges on *.* to root@"%" identified by "." 也报错
mysql> grant all privileges on *.* to root@"%" identified by ".";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by "."' at line 1
最终解决办法:
执行sql语句:
GRANT ALL PRIVILEGES ON database_name.* to 'root'@'localhost';
FLUSH PRIVILEGES;
存储过程中 definer修改为:root@localhost
java 执行mysql 8.0.11存储过程报错The user specified as a definer ('root'@'10.%.%.%') does not exist解决办法的更多相关文章
- TFDStoredProc执行sql server的部分存储过程报错,有的是好的。
TFDStoredProc执行sql server的部分存储过程报错,有的是好的. Invalid character value for cast specification 暂时无解.用fdque ...
- wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法
内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...
- 关于新版SDK报错You need to use a Theme.AppCompat theme的两种解决办法
android的一个小问题: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme ( ...
- 关于新版SDK报错You need to use a Theme.AppCompat theme的两种解决办法 - 转
android的一个小问题: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme ( ...
- Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法
报错信息: org.hibernate.event.internal.DefaultLoadEventListener onLoad INFO: HHH000327: Error performing ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- Jenkins构建报错(Jenkins is reserved for jobs with matching label expression)解决办法
Jenkins构建报错Jenkins is reserved for jobs with matching label expression 原因节点配置导致 修改配置
- 使用cnpm i -S axios 遇到报错Install fail! Error: EISDIR: illegal operation on a directory, symlink..........的解决办法
“今天本来想在cnpm 环境下安装axios,但是在安装axios的时候出现了一些问题.使用cnpm淘宝镜像库下载安装axios的时候报错 Install fail! Error: EISDIR: i ...
- Docker 启动容器时,报错 WARNING:IPv4 forwarding is disabled. Networking will not work. 的解决办法
Centos 7 Docker 启动了一个web服务 但是启动时 报 WARNING: IPv4 forwarding is disabled. Networking will not work. 解 ...
随机推荐
- Linux中查看磁盘容量
一.命令 df -hl 二.效果 [root@cq-test-master ambari]# df -hl Filesystem Size Used Avail Use% Mounted on /de ...
- XAML中特殊符号书写
XAML中特殊符号书写 表示换行. 表示空格.
- hibernate调用mysql存储过程
在mysql中创建两个存储过程,如下: 1.根据id查找某条数据: )) begin select * from emp where empId=id; end; 2.根据id查找某个字段,并返回 ) ...
- VS2015使用小技巧
VS2015常用快捷键 1.回到上一个光标位置/前进到下一个光标位置 1)回到上一个光标位置:使用组合键“Ctrl + -”; 2)前进到下一个光标位置:“Ctrl + Shift + - ” 2.复 ...
- Webview跨域访问风险
漏洞原理:WebView对象的行为是通过WebSettings类进行设置的,如果配置不当,攻击者就可以利用该漏洞可以打破Android沙盒隔离机制,从而通过某个应用来攻击其它应用,盗取其它应用本地保存 ...
- 排序基础之插入排序、冒泡排序、选择排序详解与Java代码实现
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6594533.html 一:插入排序==逐个往前相邻数比较交换,小的在前 第一轮:A[1]与A[0]比较,小的 ...
- cmake交叉编译android(转)
生成cmake编译所需的文件 #-H指向CMakeLists.txt文件父级目录 #-B指向中间产物目录 #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY指向so输出目录 #-DCM ...
- TOEIC真题学习
01.The old-fashioned delicatessen inside the street has become a popular place for lunch 街道里面的熟食店正在成 ...
- 【PMP】十五至尊图
以上是PMP的10大知识领域与5个过程组,在PMP考试中属于必须记忆的知识,该知识来源于PMBOK 第6版 附件为每日练习记忆模板,可以更好的记忆上图 点击下载附件
- 转 解决在X64 RedHat5.1 下以编译方式安装PHP 出现的种种问题
不知道大家有没有遇到在 X64 RedHat5 或者 RedHat4 下.编译安装PHP环境的时候. 安装了libxml,zlib,jpeg,libpng,freetype,libart_lgpl, ...