mysql的The user specified as a definer (”@’%') does not exist 的解决办法

两种可能:

1.用户权限不够

赋给用户所有权限试试

mysql> grant all privileges on *.* to [email protected]"%" identified by ".";
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

2.有可能这个视图或者函数的创建人不是当前的用户。一种场景是数据的导出sql,进行的数据库迁移

视图或者函数用当前的用户重建即可

mysql的The user specified as a definer (”@’%') does not exist 的解决办法

时间: 2024-08-29 23:49:41

mysql的The user specified as a definer (”@’%') does not exist 的解决办法的相关文章

mysql的“The user specified as a definer (”@’%') does not exist”问题 解决

2017-12-27,MYSQL的存储调用时出现了"The user specified as a definer ("[email protected]'%') does not exist"的问题. 网上查过后,都是提示用户权限不够,如:http://blog.handone.com/index.php/archives/137. 但我们生产环境用户都是ROOT,应该不存在用户权限问题.后来无意中发现,存储的定义者是"[email protected]%&quo

The use specified as definer('root'@'%') does not exist的解决办法

两个表(员工表和部门表)中都有数据,但是点击视图查看数据的时候反而遇见这个问题,于是查询了一下资料解决办法如下: mysql> grant all privileges on *.* to [email protected]"%" identified by ".";Query OK, 0 rows affected (0.00 sec) mysql> flush privileges;Query OK, 0 rows affected (0.00 se

mysql数据库二进制初始化出现:170425 17:47:04 [ERROR] /application/mysql//bin/mysqld: unknown option '--skip-locking' 170425 17:47:04 [ERROR] Aborting 解决办法

[[email protected] mysql]# ./scripts/mysql_install_db --user=mysql --basedir=/application/mysql/ --datadir=/application/mysql/data/Installing MySQL system tables...170425 17:47:04 [ERROR] /application/mysql//bin/mysqld: unknown option '--skip-locking

连接mysql报错Access denied for user 'root'@'localhost' (using password: YES)解决办法

1.打开MySQL目录下的my.ini文件,在文件的最后添加一行"skip-grant-tables"(免密码登录),保存并关闭文件,重启MySQL服务. 2.通过命令行进入MySQL的BIN目录,输入"mysql -u root -p"(不输入密码),回车即可进入数据库. 3.执行"use mysql;",使用mysql数据库. 4.修改密码:执行" update MySQL.user set authentication_strin

使用mysql innodb 使用5.7的json类型遇到的坑和解决办法

---------------------------------------------- #查询JSON的某个字段 select data -> '$.Host' from temp #创建虚拟列 ALTER TABLE temp ADD host varchar(128) GENERATED ALWAYS AS (json_extract(data,'$.Host')) VIRTUAL; #给虚拟列创建索引 ALTER TABLE temp ADD INDEX index_temp_hos

MySQL错误代码1138:invalid use of null value的原因及解决办法-s

表格数据我就不给了,具体原因还是:在最初没有设置默认值为not null,而后期想要修改时报错了,因为这时修改会影响很多值的初始化设置,而且不统一,可能有的列允许为空,有的列不允许为空.这时,可以进行以下操作完成.比较详细的阐述请看这里:http://www.zhimengzhe.com/shujuku/MySQL/34845.html 我自己理解的东西,转述的时候往往会有歧义或着让别人听不懂.看不懂,所以我会找到解决办法之后,理解并消化同时带上我参考文章的链接.这样能让我以及后面看到这个博客的

安装mysql 开启服务时出错/etc/init.d/mysqld: line 264: 的解决办法

安装mysql 开启服务时,出错/etc/init.d/mysqld: line 264: cd: mysql-5.5.60: No such file or directory解决办法https://blog.51cto.com/genxin/1783419 basedir 设置正确后,又出现,错误[[email protected] ~]# service mysqld startStarting MySQL.Logging to '/usr/local/mysql-5.5.60/local

Spring Boot连接MySQL长时间不连接后报错`com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.`的解决办法

报错:com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed. 添加 &autoReconnect=true 无济于事,此选项好像仅对 MySQL 5之前的版本有效. 原因 Mysql服务器默认的"wait_timeout"是8小时,也就是说一个connection空闲超过8个小时,Mysql将自动断开该connection.这

MySQL运行出错:无法连接驱动、无root访问权限解决办法

按照疯狂java讲义的13.3的程序,发现程序运行出错. 1.点开runConnMySql.cmd运行文件,出现如下结果: 2.用Editplus进行编译运行,如下结果: 报错定位到程序第18行,而第18行是驱动 原因:运行该程序需要MySQL的数据库驱动,该驱动JAR文件就是e:\mysql-connector-java-5.1.30-bin.jar文件,所以需要把该文件添加到环境变量CLASSPATH里. 3.我的电脑-->右键,属性-->环境变量,添加CLASSPATH环境变量: .;E