执行存储过程,报错

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. Linux中在线安装Mysql和修改密码设置服务启动

    一.说明:本文教大家在linux下在线安装mysql.网上的很多文章写的太乱,我们只取操作最方便的在线安装方式.本文以Centos为例. 二.安装过程. 1.安装客户端和服务端: (1)检查是否已经安 ...

  2. C++ 第十二课 其它标准C函数

    abort() 停止程序执行 assert() 当表达式非真,停止程序执行 atexit() 当程序退出执行设定的程序 bsearch() 执行折半查找 exit() 停止程序执行 getenv() ...

  3. __builtin_constant_p

    int __builtin_constant_p (exp); You can use the built-in function __builtin_constant_p to determine ...

  4. mysql 俩个时间相减后取分钟

    CASE WHEN TIMESTAMPDIFF(MINUTE,o.createDate,o.chargingStartDate) != THEN 'APP解锁计费' ELSE '系统自动计费' END ...

  5. anadroid环境搭建

    近期配置android 开发环境时,在网上搜寻诸多资料.文字一大堆,最没有解决这个问题,以下我谈一下我的配置之路: 一.开发环境需求原始资源: 1. jdk(java api):因为如今android ...

  6. MYSQL优化优化再优化!

    1.数据库设计和表创建时就要考虑性能 2.sql的编写需要注意优化 3.分区 4.分表 5.分库 .数据库设计和表创建时就要考虑性能 mysql数据库本身高度灵活,造成性能不足,严重依赖开发人员能力. ...

  7. iWatch应用开发-oc篇

    1.创建项目 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/di ...

  8. Selenium得到当前页面的URL

    /** * getCurrentURL:(get the current page URL address). * @author huchan * @param driver --- the web ...

  9. python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用)

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用) import HTMLPar ...

  10. iscsi共享分区测试

    要求:在服务器端Server0上创建一个分区/dev/sdb1(无需格式化),配置成iscsi target设备,块设备名称为sun1,iqn名称为iqn.2018-01.com.ultrapower ...