执行存储过程,报错

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. 查看postgre都有哪些语句占用CPU,以及对应的sql语句

    查看占用CPU最多的几个postgresql ps aux | grep postgres | sort -n -r -k | head - | awk '{print $2, $3}' 查看所有po ...

  2. 一个JAVA的WEB服务器事例

    其实编写一个入门级别的JAVA的WEB服务器,很简单,用SOCKET类即可实现.相关内容可以参考:http://www.cnblogs.com/liqiu/p/3253022.html 一.首先创建一 ...

  3. Live555实战之交叉编译live555共享库

    作者:咕唧咕唧liukun321 来自:http://blog.csdn.net/liukun321 能够通过这个链接获得最新的live555源代码:Live555源代码下载 Live555 是一个为 ...

  4. dubbo应用架构演进路线图

    1.单应用单服务器: 2.单应用拆分成多个应用并部署到多个服务器: 3.单应用拆分成多个应用并实现分布式部署: 4.流动计算框架(用于提高机器利用率的资源调度和治理中心).

  5. 〖Linux〗让Kubuntu的“启动栏”与Win7“任务栏”的界面和功能一样

    先来展示一下我的桌面效果图: === 是否发现这与Windows 7任务栏非常相似?哈哈- === 背景: 玩久了Unity,想换个品味,就把Ubuntu安装了KDE桌面,发现甚是不错: 这里教大家怎 ...

  6. Echarts饼图更改颜色、显示数据且换行

    var option = {   title : {       text: '数据来源',       x:'center'   },   tooltip : {       trigger: 'i ...

  7. python模块之imghdr(识别不同格式的图片文件)

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之imghdr(识别不同格式的图片文件) import imghdr '''>> ...

  8. CSS“隐藏”元素的几种方法的对比

    本文地址:http://luopq.com/2016/02/15/css-tricks-of-hide-element/,转载请注明 一说起CSS隐藏元素,我想大部分小伙伴们都会想到的第一种方法就是设 ...

  9. 腾讯alloyteam团队前端代码规范

    来源于:http://alloyteam.github.io/CodeGuide/ 命名规则 项目命名 全部采用小写方式, 以下划线分隔. 例:my_project_name 目录命名 参照项目命名规 ...

  10. LUA返回的是引用

    ,} function t1.Show() print("t1 show") end function GetT() return t1 end local t2 = GetT() ...