1. If the user has the create routine permission, he can create a procedure | function. 2. If a user creates a procedure | function, MySQL will automatically grant him the alter routine and execute permissions for the 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'; Create a routine with the spuser@'localhost' user delimiter go create procedure sp_hello_world() begin select 'hello world'; end go delimiter ; Check the permissions of spuser@'localhost' 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' | +---------------------------------------------------------------------------------------------------------------+ The above description of mysql create routine permissions is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to assign a public IP address to an instance in Linux
>>: Problems with using wangeditor rich text editing in Vue
Table of contents render.js part create-context.j...
Is it the effect below? If so, please continue re...
1. What is positioning? The position attribute in...
This article introduces how to install MySQL 8.0 ...
1. Overview mysql-monitor MYSQL monitoring tool, ...
Table of contents 1. Index Type 1. B+ Tree 2. Wha...
Table of contents 1. What is a JavaScript engine?...
Table of contents Preface Summary of the principl...
The implementation of custom carousel chart using...
1. Download the corresponding installation file f...
This article shares the specific code for WeChat ...
Implementation ideas First, create a parent conta...
Preface Since the types of the same fields in the...
To be honest, this question involves a lot of cor...
When developing and debugging a web application, ...