Mysql create routine permission description, mysqlroutine

Source: Internet
Author: User
Tags mysql create

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.