当前位置:网站首页>NetCore MySql The user specified as a definer (‘admin‘@‘%‘) does not exist
NetCore MySql The user specified as a definer (‘admin‘@‘%‘) does not exist
2022-07-26 05:08:00 【csdn_aspnet】
由于项目在本地局域网内开发使用,有时候需要对外部署显示,所以将项目迁移至外网服务器中,在外网服务器中安装mysql(8.x)数据库、iis等,将服务端发布至iis,导入数据库相关数据表、视图、函数等结构,修改项目相关配置文件,开始测试项目,请求接口过程中有部分接口提示:
"message": "The user specified as a definer ('admin'@'%') does not exist"
这是什么鬼?于是开始查找问题原因,搜索一些资料都是说权限不够,查了下用户权限:

基础权限增删改查都有,于是开放数据库外网端口,本地连接代码测试,断点跟踪一切正常,部分接口调用始终提示:
The user specified as a definer ('admin'@'%') does not exist
开始一直在代码里找原因,一直没找出来具体代码问题。
经过静静之后,是不是数据库的问题,马上开始打印sql在数据库执行,结果数据库也是同样的提示,开始使用SELECT查询关联中的单个表,果然在一个视图中提示了这个错误:

原来创建视图的定义者不是admin用户,终于找到问题原因了,将视图脚本导出,重新再外网平台数据库执行一下,果然OK了。
在创建数据库用户时尽可能保持一致,避免这种问题出现,折腾了小半天,喝杯咖啡缓缓(●'◡'●)。
边栏推荐
- Redis expiration deletion strategy and memory obsolescence strategy
- ABAP语法学习(ALV)
- 【洛谷】P1383 高级打字机
- JVM Lecture 2: class loading mechanism
- CLM陆面过程模式
- 如何优雅的复现YOLOv5官方历程(二)——标注并训练自己的数据集
- 分子骨架跃迁工具-DeLinker介绍
- CountLaunch Demo的测试
- MODFLOW Flex、GMS、FEFLOW、HYDRUS实践应用
- Alibaba three sides: how to solve the problems of MQ message loss, duplication and backlog?
猜你喜欢
随机推荐
C语言实现发牌功能基本方法
奥特学园ROS笔记--6
Excel VBA:将多个工作表保存为新文件
阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
Week 6 Learning Representation: Word Embedding (symbolic →numeric)
Mysql主从同步及主从同步延迟解决方案
Add and modify the verification logic, and use -validation- to complete the group verification
The pit of history can only be filled up as far as possible
BigDecimal 的 4 个坑,你踩过几个?
An online accident, I suddenly realized the essence of asynchrony
Seata两阶段提交AT详解
Alibaba three sides: how to solve the problems of MQ message loss, duplication and backlog?
C语言函数
Axi protocol (4): signals on the Axi channel
推荐系统-机器学习
LeetCode链表问题——203.移除链表元素(一题一文学会链表)
YOLOv5执行全过程----目录
Improve reduce parallelism in shuffle operation
推荐12个免费查找文献的学术网站,建议点赞、收藏!
ALV入门









