更改存储过程定义器 [英] Change the stored procedure definer
问题描述
我在MySQL数据库中存储了大约一百个例程,其中大多数都以"root"作为定义者.
I have a around one hundred stored routines in my MySQL database with with most of them have 'root' as the definer.
我有另一个名为'abc'的mysql帐户,如何将所有例程的定义器更改为'abc'.
I have another mysql account named 'abc', how to change the definer of all routines to 'abc'.
如果我只能以"abc"用户而不是"root"用户身份访问MySQL服务器,是否可以执行相同的操作
Is it possible to do the same if I have access to MySQL server only as 'abc' user and not as 'root'
推荐答案
据我所知: 您将必须获取所有脚本的脚本文本,并将其拖放/重新创建为abc.除非abc有权删除/创建过程,否则您将无法以abc的身份进行操作.
As far as I know: You would have to get the script text of them all and drop/recreate them as abc. You would not be able to do this as abc unless abc has permission to drop/create procedures.
这篇关于更改存储过程定义器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!