Mysql create routine permission description, mysqlroutine
1. If you have the create routine permission, you can create procedure | function.
2. If you create procedure | function, mysql automatically grants it the alter routine and execute permissions on procedure | function.
3. Example:
User root creates a spuser @ 'localhost' user and grants it the create procedure permission
grant create routine on tempdb.* to spuser@'localhost' identified by '123456';
Use spuser @ 'localhost' to create a routine
delimiter gocreate procedure sp_hello_world()begin select 'hello world';end godelimiter ;
View the spuser @ 'localhost' permission again
mysql> show grants;+---------------------------------------------------------------------------------------------------------------+| Grants for spuser@localhost |+---------------------------------------------------------------------------------------------------------------+| GRANT USAGE ON *.* TO 'spuser'@'localhost' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' || GRANT CREATE ROUTINE ON `tempdb`.* TO 'spuser'@'localhost' || GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `tempdb`.`sp_hello_world` TO 'spuser'@'localhost' |+---------------------------------------------------------------------------------------------------------------+
Some of the above instructions on mysql create routine permissions are all the content that I have shared with you. I hope to give you a reference and support for the customer's house.