mysql儲存過程定義者
阿新 • • 發佈:2019-01-27
1.
執行update mysql.proc set DEFINER='[email protected]%'WHERE NAME='p_update_rim_batch_log'AND db='otherdataonline';
NAME:函式名字、不填所有的
DB:所屬的資料庫
DEFINER:那個使用者
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
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'dxroot'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' |
| GRANT ALL PRIVILEGES ON `dxjr`.* TO 'dxroot'@'%' |
+-------------------------------------------------------------------------------------------------------+
2 rows in set
mysql>