执行存储过程,报错

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解决办法的更多相关文章

  1. TFDStoredProc执行sql server的部分存储过程报错,有的是好的。

    TFDStoredProc执行sql server的部分存储过程报错,有的是好的. Invalid character value for cast specification 暂时无解.用fdque ...

  2. wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法

    内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...

  3. 关于新版SDK报错You need to use a Theme.AppCompat theme的两种解决办法

    android的一个小问题: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme ( ...

  4. 关于新版SDK报错You need to use a Theme.AppCompat theme的两种解决办法 - 转

    android的一个小问题: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme ( ...

  5. Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法

    报错信息: org.hibernate.event.internal.DefaultLoadEventListener onLoad INFO: HHH000327: Error performing ...

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

  7. Jenkins构建报错(Jenkins is reserved for jobs with matching label expression)解决办法

    Jenkins构建报错Jenkins is reserved for jobs with matching label expression 原因节点配置导致 修改配置

  8. 使用cnpm i -S axios 遇到报错Install fail! Error: EISDIR: illegal operation on a directory, symlink..........的解决办法

    “今天本来想在cnpm 环境下安装axios,但是在安装axios的时候出现了一些问题.使用cnpm淘宝镜像库下载安装axios的时候报错 Install fail! Error: EISDIR: i ...

  9. Docker 启动容器时,报错 WARNING:IPv4 forwarding is disabled. Networking will not work. 的解决办法

    Centos 7 Docker 启动了一个web服务 但是启动时 报 WARNING: IPv4 forwarding is disabled. Networking will not work. 解 ...

随机推荐

  1. 016-Go Iris Restful测试

    1:data/data.go package data import( "fmt" "database/sql" _"github.com/lib/p ...

  2. VB操作EXCEL文件大全

    Private Sub writeToExcel(strTmp1() As String, colTmp1 As Collection)'' Dim tmp1 Dim i1 As Integer, i ...

  3. tcp线程聊天

    .ServerThread package serverclient; import java.io.BufferedReader; import java.io.InputStreamReader; ...

  4. JAVA识别字符串是数字(英文)还是汉字,web页面进行字符截断的帮助类

    public static void main(String[] args) { //长度是2说明是英文/数字/英文状态下的字符,长度为4说明是汉字/中文状态下的字符 String str = &qu ...

  5. springMVC加载远程freemarker模板文件

    在一个大网站里,有很多子域名,也就是有很多子系统,这些子系统由不同的团队负责,对整个网站的风格的风格至少得要是一致的(最基本的页头.页尾必须一致),这个时候得提供一份统一的页头.页尾以及公共的JS.c ...

  6. 转 php 5.3.6中php-fpm 配置

    php 5.3.6 中 php-fpm 配置 成 服务启动 从php5.3.3开始 源码中开始包含 php-fpm,不用专门再打补丁了,只需要解开源码直接configure, 关于php-fpm的编译 ...

  7. Swift3 根据秒数获取视频时长(转换成00:00:00时间格式)以及将时长转换成秒

    直接代码了: /// 秒转换成00:00:00格式 /// /// - Parameter secounds: <#secounds description#> /// - Returns ...

  8. hibernate关联映射注解

    转自:hibernate annotation注解方式来处理映射关系 在hibernate中,通常配置对象关系映射关系有两种,一种是基于xml的方式,另一种是基于annotation的注解方式,熟话说 ...

  9. Android开发环境——模拟器AVD相关内容汇总

     Android开发环境将分为SDK相关内容.Eclipse ADT相关内容.模拟器AVD相关内容.调试器DDMS相关内容.日志LogCat相关内容.连接驱动ADB相关内容.内存泄露检测工具MAT相关 ...

  10. Jetty使用内存过大的解决方案

    之前用Jetty做过一个消息通知服务器,主要功能就是其他各个子系统如果有需要push给客户端消息的就把这个消息发给我的Server,我用WebSocket来推送给客户端~ 程序上线一段时间之后运维工程 ...