
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How can we grant a user to access all stored procedures in MySQL?
Let us first display all users and host from the table MySQL.user −
mysql> select user,host from Mysql.user;
This will produce the following output −
+------------------+-----------+ | user | host | +------------------+-----------+ | Bob | % | | Charlie | % | | Robert | % | | User2 | % | | mysql.infoschema | % | | mysql.session | % | | mysql.sys | % | | root | % | | @UserName@ | localhost | | Adam Smith | localhost | | Chris | localhost | | David | localhost | | James | localhost | | John | localhost | | John Doe | localhost | | User1 | localhost | | am | localhost | | hbstudent | localhost | | mysql.infoschema | localhost | | mysql.session | localhost | +------------------+-----------+ 20 rows in set (0.00 sec)
Let us now grant a user “Robert” to access all the stored procedures in MySQL −
mysql> GRANT EXECUTE ON web.* TO 'Robert'@'%';
This will produce the following output −
Query OK, 0 rows affected (0.24 sec)
- Related Articles
- How can we access tables through MySQL stored procedures?
- How can we grant privileges to a MySQL user?
- What is stored procedure and how can we create MySQL stored procedures?
- How can we create MySQL stored procedures without ‘BEGIN’ and ‘END’?
- Grant all privileges of a database to a MySQL user?
- How can we set up a MySQL User account by using SQL GRANT statement?
- How can we see the list of stored procedures and stored functions in a particular MySQL database?
- How can we see only the list of stored procedures in a particular MySQL database?
- How to display grant defined for a MySQL user?
- How can we see the list, along with other information, stored procedures in a particular MySQL database?
- How can we see the list, along with complete information, of stored procedures in a particular MySQL database?
- Grant a user permission to only view a MySQL view?
- Create a stored Procedures using MySQL Workbench?
- MySQL query to create user and grant permission
- What are stored procedures? How to call stored procedures using JDBC program?

Advertisements