Desire to grant user access restricted to only display one stored procedure in the database AND prevent user from seeing any other tables, views and/or procs.
I have read this post and:
GRANT EXECUTE ON PROCEDURE myDB.spName TO 'TestUser'@'localhost';
works when the user accesses via PhpMyAdmin on the test server but not remotely (odd). When remote they can only "see" the information schema. Do I need to fully qualify the server name instead of 'localhost'?
Also have read the MySQL security docs to no avail.
Lastly, this question posted two years ago seems to describe a similar need but never answered.
[edit to show grants]
Grants for TestUser@localhost
GRANT USAGE ON *.* TO 'TestUser'@'localhost' IDENTIFIED BY PASSWORD '*FC6....'
GRANT EXECUTE ON PROCEDURE `database`.`sp_name` TO 'TestUser'@'localhost'
[SOLUTION from @BK435 below] To give remote user MySQL access to one (or more) stored procs and nothing else you will need their IP address and then:
1.) If MySQL remote security is in use use cPanel->Remote MySQL and "Add an Access Host" with their IP, then execute this command in MySQL (assumes adequate rights)
GRANT EXECUTE ON PROCEDURE YourDatabase.YourStoredProcedure TO 'TestUser'@'THIER IP ADDRESS';