执行存储过程,报错

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. 使用PyInstaller打包Python角本为exe程序

    一.经过测试 在Windows平台请使用Windows平台的pyinstaller,Linux平台请使用Linux平台的Pyinstall角本. 二.命令如下: pyinstaller -F --ic ...

  2. 初识:JMX

    来自:http://blog.csdn.net/derekjiang/article/details/4531952 JMX是一份规范,SUN依据这个规范在JDK(1.3.1.4.5.0)提供了JMX ...

  3. xampp 教程

    xampp教程1 使用安装包进行安装 (目前有三种可供选择下载的XAMPP for Windows: 安装包   简单且安全:XAMPP 的便捷安装程序.) 使用安装包来安装XAMPP是最简单的方法. ...

  4. ibatis 批量更新(二)

      1.情景展示 oracle数据库中,需要根据指定字段内容调用加密程序后,根据主键id进行更新其对应的字段mindex_id的值: 加密通过Java实现,然后通过Java对其进行更新: Java使用 ...

  5. 【shell】定时删除DB2表数据

    使用db2的时候,有时候需要对表数据进行删除,防止数据太多,造成数据库空间满了 以下是一个定时删除表tmp,tm1中id为1的数据的脚本 #!/bin/sh ##------------------- ...

  6. CentOS7下HTTP并发测试工具Apache Benchmark(AB)安装和使用

    安装: yum -y install httpd-tools 使用: ab -c -n http://10.255.67.60:1111/info -c 并发数,concurrency -n 发送多少 ...

  7. Docker Swarm Mode无法增加管理节点

    这两天用Docker Swarm Mode,加入新的管理节点会报以下错误(在/var/log/messages文件中可以看到): Handler for POST /v1.37/swarm/join ...

  8. 3299 有序数组合并求第K大问题

    题目描述 Description 给出两个有序数组A和B(从小到大有序),合并两个有序数组后新数组c也有序,询问c数组中第k大的数 假设不计入输入输出复杂度,你能否给出一个O(logN)的方法? 输入 ...

  9. 9273:PKU2506Tiling

    9273:PKU2506Tiling 来源:http://noi.openjudge.cn/ch0202/9273/ 总时间限制:2000ms  单个测试点时间限制:1000ms内存限制:131072 ...

  10. HTTP 接口响应数据解析

    转自:https://blog.csdn.net/hubanbei2010/article/details/79878567 作为产品线的支撑角色QA/CI/CD等,http api解析是互联网公司中 ...