問題描述:
Mysql中UserA 調用UserB的函數時遇到
[Err] 1370 - execute command denied to user ‘test’@’127.0.0.1’ for routine ‘lw.historynextval’
查看UserA的權限
mysql> show grants for UserA@192.168.10.61;
GRANT EXECUTE ON FUNCTION lw.historynextval TO ‘UserA’@’192.168.10.61’
UserA調用UserB的函數,返回[Err] 1370,Why?
mysql -uUserA -p -h 127.0.0.1 -P 3316 -e “select lw.historynextval()”
[Err] 1370 - execute command denied to user ‘test’@’127.0.0.1’ for routine ‘lw.historynextval’
用UserB調用自己定義的函數,返回ERROR 1370 (42000)
mysql -uUserB -p -h 127.0.0.1 -P 3316 -e “select lw.historynextval()”
Enter password:
ERROR 1370 (42000) at line 1: execute command denied to user ‘test’@’127.0.0.1’ for routine ‘lw.historynextval’
從錯誤的描述來看是,UserB沒有執行自己定義函數的權限
授權給UserB執行函數的權限
GRANT EXECUTE ON lw.* TO ‘test’&#
本文发布于:2024-01-30 22:09:18,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170662375923175.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |