mySql中The user specified as a definer ('root'@'%') does not exist
背景
最近往现场导了个库,发现功能报错,一看是视图报错,navicat一看,哎呦,直接报错。The user specified as a definer ('root'@'%') does not exist。
解决办法
因为视图的人在创建的时候
他选择了定义者才能执行。于是当你切换到其他用户当然不行啦。
解决办法1
如果你只有当前用户,你没有root用户的密码,建议你删除当前视图,复制好语句,重新建立。
解决办法2
如果你有高级用户的权限输入命令
grant all privileges on *.* to root@"%" identified by ".";
flush privileges;
将root换成你要授权的用户。
解决办法3
将范围改成
补充一点
针对于视图的安全性补充一下。
definer
当定义为DEFINER时,必须数据库中存在DEFINER指定的用户,并且该用户拥有对应的操作权限,才能成功执行。与当前用户是否有权限无关。
invoker
当定义为INVOKER时,只要执行者有执行权限,就可以成功执行。
mySql中The user specified as a definer ('root'@'%') does not exist的更多相关文章
- MYSQL : The user specified as a definer ('root'@'%') does not exist
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 解决方法: 2.进入mysql ...
- [bug] MySQL: The user specified as a definer ('root'@'%') does not exist
错误1 gciantispider.getchildlst does not exist 原因 getchildlst创建失败 解决 在mysql中设置mysqld中加上log_bin_trust_f ...
- MySql 数据库 SQLException: The user specified as a definer ('root'@'%') does not exist 错误原因及解决办法
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 经查明:是用户root并没有获 ...
- Mysql 查询视图出现The user specified as a definer ('root'@'%') does not exist的问题
今天服务器Mysql版本在5.7升级到8.0+之后,部分网站(老的)访问视图出现The user specified as a definer ('root'@'%') does not exist问 ...
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist ,mysql 赋给用户权限 grant all privileges on
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法 遇到了 SQLException: acce ...
- The user specified as a definer ('root'@'%') does not exist
The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限) 解决方法: 2.进入mysql ...
- 本机jdbc连接报The user specified as a definer ('root'@'%') does not exist
昨晚一台测试服务器连接本机的mysql时,有些调用存储过程报"The user specified as a definer ('root'@'%') does not exist" ...
- MySqlException: The user specified as a definer ('root'@'%') does not exist解决方法
之前因为MySql安全问题,将root@%改为允许特定ip段进行远程连接,结果有一个接口报The user specified as a definer ('root'@'%') does not e ...
- msyqld 的 The user specified as a definer ('root'@'%') does not exist 问题
msyqld 的 The user specified as a definer ('root'@'%') does not exist 问题 造成问题:搭建网站时显示内容不完整. 跟踪tomcat日 ...
随机推荐
- 2019-11-6:ubuntu安装配置JAVA环境
1,下载JAVA,官方java 18下载网站:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-21331 ...
- Python-Re正则表达式库
来源:中国MOOC北京理工大学Python教学团队 链接:https://www.icourse163.org/learn/BIT-1001870001#/learn/content?type=det ...
- 原生JS通过类名(className)获取dom元素
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 程序员的算法课(3)-递归(recursion)算法
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/m0_37609579/article/de ...
- 【前端】之AJAX基础知识
AJAX 简介 AJAX(Asynchronous JavaScript and XML),异步的JavaScript和XML AJAX不是编程语言,只是一种在无需重新加载整个网页的情况下能够更新部分 ...
- centos 7 MysSQL 5.7.23 源码安装
MySQL 5.7.23 源码安装 CentOS 7 将默认数据库MySQL替换成了Mariadb. 这里会从系统的环境准备开始一步一步安装. 环境准备 系统版本 内核版本 IP地址 Centos 7 ...
- Linux高级知识
Linux高级知识 十一.LAMP架构 1.LAMP架构介绍.MySQL.MariaDB介绍.MySQL安装 2.MariaDB和Apache安装 3.安装PHP5和PHP7 4.Apache和PHP ...
- vue基本开发环境搭建
先安装node运行环境下载网址 https://nodejs.org/en/或者http://nodejs.cn/ 检查node是否安装成功命令行窗口直接输入 $ node -v 如果输出版本号,说明 ...
- git的基本使用-1
1.git的安装 这里只介绍在 Linux 上安装. 如果你想在 Linux 上用二进制安装程序来安装 Git,可以使用发行版包含的基础软件包管理工具来安装. 如果以 Fedora 上为例,你可以使用 ...
- 上手spring boot项目(二)之spring boot整合shiro安全框架
题记:在学习了springboot和thymeleaf之后,想完成一个项目练练手,于是使用springboot+mybatis和thymeleaf完成一个博客系统,在完成的过程中出现的一些问题,将这些 ...