title: Grant/Permit all MySQL User Defined Functions under a database to a user
body: <p>How can I grant execute permission for all of the user defined functions under a database to a particular user? A new user may execute/run all functions defined by some other users.</p>
  
  <pre><code>1. GRANT ALL ON DATABASE.* TO 'USERNAME'@'HOSTNAME';
  2. GRANT EXECUTE ON DATABASE.* TO 'USERNAME'@'HOSTNAME';
  </code></pre>
  
  <p>Both of these attempts failed to permit a new user. And the following call ends with an error.</p>
  
  <pre><code>SELECT f_custom_function();
  </code></pre>
  
  <p>Corresponding Error Message:</p>
  
  <pre><code>Query : ____
  Error Code : 1370
  execute command denied to user 'USERNAME'@'HOSTNAME' for routine 'DATABASE.f_custom_function'
  </code></pre>