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. 解 ...
随机推荐
- 使用 git post-receive 钩子部署服务端代码
在 git 中提交服务器源码的时候,如果能够直接更新到测试服务器,并且重启服务使其生效,会节省懒惰的程序员们大量的时间. git 的 Server-side hook (服务端钩子/挂钩)可以用来做件 ...
- SQL Server connect to MySQL SQL Server通过LinkServer访问MySQL数据库,并操作mysql数据库代码
SQL Server 中需要访问MySQL的数据,可以通过调用MySQL的ODBC驱动,在SQL Server中添加LinkServer的方式实现. 1.从MySQL网站下载最新的MySQL ODBC ...
- C# lambda方式取出前十个经常联系的手机号码
这个场景适合所有要查找相同字符串的个数并返回一个序列 //取出前十个经常联系的手机号(即:计算重复手机个数最多的前十个) ).Select(i=>).ToList();
- Generate BKS File( Bouncy Castle KeyStore)
echo "Enter BKS output file name : \c" read filename echo "Enter BKS Password : \c&qu ...
- Lucene解析 - 基本概念
Elasticsearch 权威指南中文版 https://www.elastic.co/guide/cn/elasticsearch/guide/cn/index.html 对于跳跃表,我们看 ...
- python模块之HTMLParser抓页面上的所有URL链接
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之HTMLParser抓页面上的所有URL链接 import urllib #MyParse ...
- Libevent例子(二)
服务端 #include<netinet/in.h> #include<stdio.h> #include<string.h> #include<event. ...
- bootstrap table + spring + springmvc + mybatis 实现从前端到后端的表格分页
1.使用准备 前台需要的资源文件,主要有Bootstrap3相关css.js以及bootstrap Table相关css.js: <-- 样式 --> <link rel=" ...
- SpringMVC框架学习
2012-03-21 衡量一个MVC框架模式,主要通过三种web模式,本人认为springMVC是一个很好的MVC 模式,对模式的支持如下: (1)派遣器模式 Spring有一个统一集中的派遣器org ...
- Golang 用go-sql-driver 调用MySQL存储过程时的问题排查
今天在用go-sql-driver做MySQL driver调用MySQL的存储过程时遇到一个罕见的报错.本文对这个错误及其解做一个简单的总结. 1 问题描述 按照go中sql包提供的接口,应用层代码 ...