mysql 存储过程的权限问题 java.sql.SQLException: The user specified as a definer ('xxxx'@'%') does not exist

来源:互联网 发布:二进制是谁发明的 知乎 编辑:程序博客网 时间:2024/03/29 07:47

从一个数据库 复制存储过程到另外一个数据库


如果是用图形界面的软件 比方说navicat   复制过去的话,然后执行 容易报错如下


java.sql.SQLException: The user specified as a definer ('xxxx'@'%') does not exist


因为在创建存储过程的时候吧相应的 定义的权限也带过去了,修正办法如下


重新定义存储过程了,比方说增加


create definer ='root@localhost' procedure()


当然你也可以选择重新创建,不过重新创建以后也有可能出现 上面的额错误 ,就只能 


UPDATE`mysql`.`proc` p SET definer ='root@localhost'WHERE definer='root@foobar'

0 0
原创粉丝点击