mysql stored procedure defined by

1.

执行update mysql.proc set DEFINER='root@%' WHERE NAME='p_update_rim_batch_log' AND db='otherdataonline';

NAME: function name, do not fill all

DB: database belongs

DEFINER: the user

2.

mysql> CREATE USER 'dxroot'@'%' IDENTIFIED BY 'root

'; 
Query OK, 0 rows affected


mysql> GRANT all privileges ON dxjr.* TO 'dxroot'@'%' ;
Query OK, 0 rows affected


mysql> flush privileges;
Query OK, 0 rows affected


mysql> show grants for dxroot;
+-------------------------------------------------------------------------------------------------------+
| Grants for dxroot@%                                                                                   |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'dxroot'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' |
| GRANT ALL PRIVILEGES ON `dxjr`.* TO 'dxroot'@'%'                                                      |
+-------------------------------------------------------------------------------------------------------+
2 rows in set


mysql> 
Published 55 original articles · won praise 31 · views 80000 +

Guess you like

Origin blog.csdn.net/zengfanwei1990/article/details/78696242