当前位置:网站首页>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了。
在创建数据库用户时尽可能保持一致,避免这种问题出现,折腾了小半天,喝杯咖啡缓缓(●'◡'●)。
边栏推荐
- How many holes have you stepped on in BigDecimal?
- Excel VBA:按日期汇总计算输出结果(sumif)
- 嵌入式分享合集20
- Trend of the times - the rise of cloud native databases
- 普林斯顿微积分读本02第一章--函数的复合、奇偶函数、函数图像
- AQS唤醒线程的时候为什么从后向前遍历,我懂了
- 遥感、GIS和GPS技术在水文、气象、灾害、生态、环境及卫生等领域中的应用
- 35. Search the insertion position
- uniapp小程序框架-一套代码,多段覆盖
- Full analysis of domain name resolution process means better text understanding
猜你喜欢

ALV程序收集

分子骨架跃迁工具-DeLinker介绍

MySQL master-slave synchronization and master-slave synchronization delay solution

JVM Lecture 2: class loading mechanism

普林斯顿微积分读本02第一章--函数的复合、奇偶函数、函数图像

分布式ID的常用解决方案-一把拿下

Alibaba cloud industrial vision intelligent engineer ACP certification - Preparation

Textfield and password input box that are more flexible and easy to use in compose

Uniapp applet framework - a set of code, multi segment coverage

Recommendation system - machine learning
随机推荐
Computable general equilibrium (CGE) model practice technology in resource environment under the goal of "double carbon"
How to reproduce the official course of yolov5 gracefully (II) -- Mark and train your own data set
security权限管理详解
Shell流程控制(重点)、if 判断、case 语句、let用法、for 循环中有for (( 初始值;循环控制条件;变量变化 ))和for 变量 in 值 1 值 2 值 3… 、while 循环
CLM陆面过程模式
Annotation @autowired how to assemble automatically
嵌入式分享合集20
黑吃黑?男子破解赌博网站漏洞,每月“薅羊毛”10多万元
面试之请详细说下synchronized的实现原理以及相关的锁
公交站间的距离 : 简单模拟题
Unnamed Article 33
mysql函数汇总之日期和时间函数
开发转测试:从零开始的6年自动化之路
Application of remote sensing, GIS and GPS technology in hydrology, meteorology, disasters, ecology, environment and health
MySQL eight knowledge points: from getting started to deleting the database
C language function
ALV程序收集
ALV入门
MySQL基础学习
汉字风格迁移篇---通过生成对抗网络学习一对多程式化汉字的转换和生成