MySQL: Is there a way to find out which user called stored procedure?
Back on Jan 10, 2012, I answered MySQL error: Access denied for user &#39;a&#39;@&#39;localhost&#39; (using password: YES) where I show two function calls:


USER() reports how you attempted to authenticate in mysqld
CURRENT_USER() reports how you were allowed to authenticate by mysqld


Since CURRENT_USER() shows the definer, try using USER(). It might display the MySQL user and the host where that user was coming in from. Please note that this may not work if USER() is an internal thread running the Stored Procedure.